Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Relative Path in INCLUDETEXT
I'm attempting to include a number of small documents within a larger
document. The small documents are in a subfolder called "Modules." It worked very well when I used the Insert-File command, but the documents disappeared when I moved the big document to another computer--but to a folder that had the same subfolder ("Modules") and smaller documents. I am trying to change the INCLUDETEXT statement to include a relative path, instead, but every attempt gives me the "Error! Not a valid filename." I've tried: {INCLUDETEXT "...\\Modules\\Module 4.htm" \c HTML} {INCLUDETEXT "\\Modules\\Module 4.htm" \c HTML} {INCLUDETEXT "Modules\\Module 4.htm" \c HTML} What is the right syntax for a relative path within an INCLUDETEXT field, or is a relative path even possible? Thanks, Donna |
#2
|
|||
|
|||
Actually, it works, but not the way you're thinking. The path used is
dynamic with respect to Word's current directory -- not with respect to the folder containing the file that's open. Suppose, for example, that Module4.htm is located he c:\Project\Modules\Module4.htm. If you choose File - Open and navigate to the c:\Project folder, then the following works: {includetext "Modules\\Module4.htm"} This works because Modules is now a subfolder in Word's currently logged folder. If, however, you navigate to: c:\Project\Modules The same includetext field no longer works. It would work if Module4.htm were in c:\Project\Modules\Modules. If you can manipulate Word to log to a specific starter folder, you're okay. But, keep in mind that relative means relative to where Word itself is pointing, which might not be where the current file is located. The reason this almost always fails is that the user navigates to the location of the file to be includetext'd. This now means that Word is pointing at THAT folder. If you simply navigate back to the previous level, the relative reference will work. Clear as mud? -- Herb Tyson MS MVP Please respond in the newsgroups so everyone can follow along. http://www.herbtyson.com "Donna" wrote in message ... I'm attempting to include a number of small documents within a larger document. The small documents are in a subfolder called "Modules." It worked very well when I used the Insert-File command, but the documents disappeared when I moved the big document to another computer--but to a folder that had the same subfolder ("Modules") and smaller documents. I am trying to change the INCLUDETEXT statement to include a relative path, instead, but every attempt gives me the "Error! Not a valid filename." I've tried: {INCLUDETEXT "...\\Modules\\Module 4.htm" \c HTML} {INCLUDETEXT "\\Modules\\Module 4.htm" \c HTML} {INCLUDETEXT "Modules\\Module 4.htm" \c HTML} What is the right syntax for a relative path within an INCLUDETEXT field, or is a relative path even possible? Thanks, Donna |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to creat relative and shorthand file path names? | Microsoft Word Help | |||
Includetext Source Path Office 2003 | Microsoft Word Help | |||
relative path within includetext | Mailmerge | |||
hyperlink changes address from absolute path to relative | Microsoft Word Help | |||
Add support for relative path names in master documents | Microsoft Word Help |