Results 1 to 13 of 13
  1. #1
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    INCLUDEPICTURE filepaths (2002)

    I know that a filepath can be absolute or relative. But what I don't know is how you make a link relative/absolute. There isn't an option to choose. So, how does Word decide what type of link to make? And how does it know where a file is from a relative link like this, for instance - "../../../06070001.jpg". Also, if I changed all the relative links to absolute paths (with a macro), would that be ok?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    We had a thread before (this one) where the problem was that Word automatically replaced the relative file paths in INCLUDEPICTURE fields with complete (absolute) paths in UNC format. It's somewhat mysterious that yours remained relative and/or that people get different results. Hopefully someone who has worked with this feature more extensively will be able to help.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Jefferson has already pointed you to the thread where macropod has a link to his macro that updates IncludePicture fields (& other link fields). If I recall correctly, Word 97 allowed you to insert absolute or relative links because that option was in the Insert/Hyperlink dialog box. However, starting with Word 2000, MS left out that option. My experience (using Word 2000) has been that Word will insert relative links if you have already saved the destination file. If your file isn't saved, Word will use an absolute link. The latter makes sense because you can't have a relative link when a file doesn't yet have a location on the hard drive.

  4. #4
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Thanks for your help guys. Macropod's utility will help me to deal with my problem. But, I would still like to understand what is going on... I can't seem to make it use relative paths, only absolute now! If I link to a file in an unsaved document I get an absolute path, If I save it and link to another file I still get an absolute path, and yet yesterday, it was putting in relative paths! Hmmm.

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Sorry, I need to correct something I said in <post#=396605>post 396605</post#>. The information I gave was correct for Hyperlink fields inserted using the hyperlink dialog box. For some reason, I was not thinking of the IncludePicture field dialog box. Also, I have Word 2000, so there may have been a change in the dialog box.

    How are you inserting the IncludePicture field? In Word 2000, whether you use the dialog box or type it directly using Ctrl+F9, it's up to you to type the path. You can manually insert either an absolute or relative path, but Word doesn't insert any path.

  6. #6
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    I insert the picture by using the Insert->Picture->From File and browsing to the file then selecting Link. I didn't know you could type it in!

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Of course (Insert/Picture). I hadn't used that for some time & forgot about it.
    I just tried it with the following steps:
    1. Created a new document.
    2. Went to Insert/Picture/From file...
    3. Selected a picture & clicked the arrow next to the Insert button & choose "Link to File".
    4. Saved the new document.
    5. Repeated the steps of inserting a couple of files from the Insert/Picture/From file.../Link to File route.

    Then I showed field codes. The pictures created before Step 4 were all absolute paths; the ones after were all relative paths. The only other thing I can think of is that perhaps your destination document has a hyperlink base. If it does, it would have had to be put there deliberately (by you or someone else) & would be seen under File/Properties/Summary tab.

  8. #8
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    I repeated your steps. New document, inserted 2 picture links, ALT+F9 for a look & both links are absolute. Saved the document, inserted 2 more links and again I get 2 more absolute links! i.e "Q:Technical PublicationsGraphics-OutputMK8NOZF2.TIF" (Where Q: is a mapped network drive, where the documents are also stored, although in a different folder. Does this make any difference?) It isn't a problem that they are absolute, I am just trying to understand what happens! And I don't...

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    I don't have 2002 to check. It doesn't happen on my Word 2000 version, but something might have changed or there might be some add-in that causes it. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> If you start Word from the command line (Start/Run/ & type <big><font color=red><code>
    winword.exe /a</code>
    </font color=red></big> <enter> & then try it, does the same thing happen?

    Oh, & I assume that you checked & do not have a hyperlink base in the template creating the document.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    I tried your steps in Word 2002.
    When I inserted a linked picture in the new, unsaved document with a blank hyperlink base, the path in the field code was absolute. The moment I saved the document, the path in the already existing link changed to relative. Links added after that were also relative.

  11. #11
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Well that's strange! when I ran Word from the command line, Word 97 started up - it appears that our IT dept left it on when they upgraded me. Anyway, now I get the same behaviour as you. (I checked the hyperlink base and it was not set in 2002).
    Running Word 2002 from the command line and I'm back to where I was, so it appears to be version dependant!

    I have lots of documents with graphics links that have been created using versions of Word from 6 to 2002, and some will have links that were created and or edited in different versions of Word, which is why I suppose that I have all sorts of links and filepaths.

    This is really what I want to sort out, because some documents take ages to open when the link is broken (because we have moved site twice and when IT set up new servers they never ask if things will break if they move our docs/graphics). Ho hum...

  12. #12
    New Lounger
    Join Date
    Aug 2004
    Location
    Hampshire, England
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    Regarding the behaviour that HansV gets being different to mine, perhaps there is a setting somewhere that I need to alter? I will look around and experiment.

  13. #13
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: INCLUDEPICTURE filepaths (2002)

    > The latter makes sense because you can't have a relative link when a file doesn't yet have a location on the hard drive.

    Thanks Phil. This has been bugging me for 24 hours.
    A little bit of code that worked perfectly yesterday (insert linked pictures into a document) failed today.
    Because: yesterday I ran it in a previously-saved template, but today I'm trying to make it work in a new document. (Clang!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •