Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
IncludeText with relative path
I have this text from a site:
------------------------------------------------------------------------------------- When Word sees a relative filepath in a document, instead of checking the filepath against the filepath of the document, Word uses the currently active folder to check the relative filepaths. For instance, if you opened the target doc, then opened the source doc, Word will measure all filepaths against the source doc, as that is the currently active folder. In the target doc, your relative filepaths will suddenly stop working and will show Error! Cannot open file. If you only open the target doc, however, or reopen the target doc after opening the source doc, the relative filepaths will work fine after updating them. Again, always be sure to update fields regularly, as sometimes everything will look okay but fail when you attempt to update it. Or vice versa€”updating can fix a field that looked entirely incorrect. The really annoying thing about this behavior is that it's guaranteed to be intermittent. It will only cause a problem some of the time. You can go through the same actions, and sometimes all your links will fail, and sometimes they won't (since most of us don't pay attention to the invisible setting for the currently active folder in Word). Workaround 1: use absolute filepaths, but create a custom document property to store the base filepath (FilePropertiesCustom). Then use a DocProperty field to carry the path info into the IncludeText fields. You can easily change the custom document property in FileProperties. The nested fields might look like this: { INCLUDETEXT "{ DOCPROPERTY LinkFilePath }Source.doc" Bookmark } Workaround 2: use relative filepaths, but go into FileProperties and set a €śhyperlink base€ť for the document. Then Word should read all relative filepaths from that base, instead of checking against the currently active folder. Help says this works, but some people have had problems with it. ------------------------------------------------------------------------------------ Can someone explain me or give me an example about these Workarounds? I think the Workaround 1 isn't what I want, because I don't want the user changes the custom property each time he moves the document. And about the Workaround 2, how do I use the hyperlink base property to make the path relative? If the user moves the document, does this procedure work? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Relative path links | Microsoft Word Help | |||
Relative Path in INCLUDETEXT | Microsoft Word Help | |||
Relative File Path | Microsoft Word Help | |||
relative path within includetext | Mailmerge | |||
Relative path in LINK field ? | Microsoft Word Help |