Interesting, since I had a similar issue. I've got INCLUDETEXT statements
within complex IFs using COMPAREs, where I need to bring in detailed
instructions when certain conditions are met for various services. So far
I've got all of my text to be included in a separate document and am using
Bookmarks to control which pieces to bring into each area. So, I needed to be
able to have an easy way to manage version control (by keeping the Include
document at the same version as the main document). However, I don't want to
have to find and replace all of them, since I'll have several hundred when
done. I've figured out a pretty easy way to do this, which is what I think
you are trying to accomplish, as well.
First, near the beginning of the main document, I set the path and filename
using the following structure.
{SET var_IncludeFile "{HYPERLINK "C:\\path\\file.doc"}"} -- I just used the
insert Hyperlink menu and it resolved all of the double slashes, folders,
etc. ...
I display it for verification purposes for now: { var_IncludeFile }
I also have a macro set up to lock it, allow me to use a couple of
drop-downs for selection criteria, then a checkbox with another macro to
unlock it, select all (CTRL-A), update (F9), Find a header - just to get it
to unselect everything and put them at the beginning. Sorry for the detail,
but did want to indicate some other stuff is going on here...
Then, where I have my logic for including the text where needed like
{IF {=OR ({Compare <criteria> })} = 1 "{IncludeText "{var_IncludeFile}"
bookmark_name_for_this_piece } " ""}
+
Interesting thing I stumbled across that Peter already verified on a
different thread, is that the extra space following the close bracket after
the bookmark (where I've put the '+' allows hyperlinks within the bookmarked
text that's being included to work. If you don't have the extra space then
Word ignores the Hyperlink piece for some reason...
The other thing to mention, that you seem to have already run into, sort of,
is that the IncludeText builds external Links for your document. I kept
getting "Error! Invalid Filename" and finally realized that in my zest to get
organized for this approach, I moved the main document and the Included text
document to a new folder, which broke the links. I thought it was really
interesting (NOT) that everytime I tried to Update the IncludeText with
another variation of my approach, Word was kind enough to add an extra Link
for the same dang statement... So, I've had to clean up quite a few test
cases.... You may want to verify in 2003 under Edit, Links or in 2007 under
Windows, Prepare, Edit Links to see how many extras you have. Unfortunately,
I don't see an easy way to determine which one for the statement is correct.
You may need to delete all of them, and re-add them. I'm still working on
this part, so hopefully I can find a way to mechanize this process, since I
know when I move this to the SharePoint site we use, I'll have to rebuild
them all again... For some reason, all of the links are set to Manual, and
the options to automatically update are grayed out...
Hopefully, you will find this useful.