# Referencing bookmarks across multiple files -INCLUDETEXT help



## Emboldener (Sep 4, 2008)

I'm having some incredibly frustrating problems with the INCLUDETEXT command - here is what I want to accomplish.

CREDITS folder. This folder contaings about 15 SUBFOLDERS each with their own word document. All of these documents are to share the same 'Project Name,' 'Project Location,' etc.

I want to be able to enter the Project Location, Project Name, etc, once and have this update in all of the files. To do so I have created a seperate Project_Info.doc in the main CREDITS folder and have entered placeholder words and made them referencable, functioning bookmarks.

The folders look like this

T:\CREDITS\SUBFOLDER 1
SUBFOLDER 2
SUBFOLDER 3
...
SUBFOLDER 15
Project_Info.doc

The CREDITS folder is going to be copied and pasted into various project folders, updating the Project Name and Location each time (such as P:\CREDITS or P:\BUILDING\CREDITS)

When I use the following include text command

{INCLUDETEXT "\"T:\\LEED [Folder Structure]\\Credits+Submittal\\Project_Info.doc\""}


the entire file is included followed by a carriage return which I do not want. When I reference the fully functioning bookmark as follows:

{INCLUDETEXT "\"T:\\LEED [Folder Structure]\\Credits+Submittal\\Project_Info.doc\" ProjName"}

I get an "Error! Not a valid filename" message. Furthermore, if I reference with links from the server (say on the T:\ drive) when I copy and paste the folder into a new project on, say, the P:\ drive, the links will break.

There has to be a way for this to work. Solutions?


----------



## macropod (Apr 11, 2008)

Hi,

Your INCLUDETEXT field coding is incorrect. It should be:
{INCLUDETEXT "T:\\LEED [Folder Structure]\\Credits+Submittal\\Project_Info.doc"}
or
{INCLUDETEXT "T:/LEED [Folder Structure]/Credits+Submittal/Project_Info.doc"}
for the entire file, or:
{INCLUDETEXT "T:\\LEED [Folder Structure]\\Credits+Submittal\\Project_Info.doc" ProjName}
or
{INCLUDETEXT "T:/LEED [Folder Structure]/Credits+Submittal/Project_Info.doc" ProjName}
for the bookmarked range.

To minimise the recoding effort for each document, you could incorporate the project folder path into a Custom Document Property (see under File|Properties|Custom), then have your INCLUDETEXT field reference that via an embedded DOCPROPERTY field. For example:
{INCLUDETEXT "{DOCPROPERTY "ProjectPath"}/Credits+Submittal/Project_Info.doc" ProjName}
where 'ProjectPath' is the name of your Custom Document Property and its contents specify the file path.

Alternatively, you may be able to incorporate the relative path referencing technique I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027
This has the advantage of automatically updating the paths to match whatever drive & base project path you're using.


----------



## Emboldener (Sep 4, 2008)

Thanks kindly, macropod. The INCLUDETEXT field now works - I need some clarification with the FILENAME relative path technique.

As you can see, the Project_Info.doc file that contains the to-be-once-updated information is located as follows: 

T:\\LEED [Folder Structure]\\Credits+Submittal\\Project_Info.doc

Now, each of the 15 subfolders in the "Credits+Submittal" folder that contain the various word docs that reference the Project_Info.doc need to effectively reference back a bit - such that:

T:\LEED [Folder Structure]\Credits+Submittal\EAc4 - Enhanced Refrigerant Management\Credit4.doc

needs to go *back* up one folder layer to Credits+Submittal\Project_Info.doc .

When I input FILENAME into the INCLUDETEXT, it seems that I can go deeper into more subfolder references, but not back, such that

{INCLUDETEXT "{FILENAME \p}/Credits+Submittal/Project_Info.doc " ProjName }

becomes

{INCLUDETEXT "T:\LEED [Folder Structure]\Credits+Submittal\EAc4 - Enhanced Refrigerant Management\Credit4.doc/Credits+Submittal/Project_Info.doc " ProjName }

And it mixes up the forward and back slashes.

Any way I can get Word to look just one folder layer up to get the Project_Info.doc reference? Or better yet, any way to set up the file structure to get the same results as originally posted?

Thanks again.


----------



## macropod (Apr 11, 2008)

Hi Emboldener,

If I understand it correctly, your 'Project_Info.doc' file is the one with all the INCLUDETEXT fields. If that's so, the relative path technique for any file in that file's folder would be:
{INCLUDEPICTURE "{FILENAME \p}/../Filename.ext" BkMrk}
or
{INCLUDEPICTURE "{FILENAME \p}\\..\\Filename.ext" BkMrk}
where 'Filename.ext is the file's name and 'BkMrk' is the name of the bookmarked range (if any) that you're linking to.

If I also understand your file's location, it's in the 'Credits+Submittal' folder. Therefore, to link to a file in the 'EAc4 - Enhanced Refrigerant Management' child folder, the field coding would be:
{INCLUDEPICTURE "{FILENAME \p}/../EAc4 - Enhanced Refrigerant Management/Filename.ext" BkMrk}
or
{INCLUDEPICTURE "{FILENAME \p}\\..\\EAc4 - Enhanced Refrigerant Management\\Filename.ext" BkMrk}

Conversely, to link to a file in the parent to the in the 'Credits+Submittal' folder, the field coding would be:
{INCLUDEPICTURE "{FILENAME \p}/../../Filename.ext" BkMrk}
or
{INCLUDEPICTURE "{FILENAME \p}\\..\\..\\Filename.ext" BkMrk}

It really doesn't matter whether you use single forward slashes or double backslashes as the path separators.


----------

