Reply
 
Thread Tools Display Modes
  #1   Report Post  
Donna
 
Posts: n/a
Default 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   Report Post  
Herb Tyson [MVP]
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to creat relative and shorthand file path names? 2dogs Microsoft Word Help 1 May 15th 05 12:11 PM
Includetext Source Path Office 2003 Steve Microsoft Word Help 5 April 12th 05 01:26 PM
relative path within includetext George Lagger Mailmerge 2 January 27th 05 03:15 PM
hyperlink changes address from absolute path to relative tnybecker Microsoft Word Help 2 January 7th 05 08:35 AM
Add support for relative path names in master documents Alex Microsoft Word Help 1 November 25th 04 10:43 AM


All times are GMT +1. The time now is 04:34 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"