Relative Links with includeText

J

Jason Krug

I am trying to create a document strucutre that I can
copy into several folders. A generic master Document
that pulls in additional data specific to the server,
based upon the folder it is in. I have a script that
will create the data files; I store those data files in
separate folders. I would like to copy the 'SAME' master
file to each FOLDER?

I can do this EASILY with Hyperlinks, but you will not be
able to print the contents of MASTER.DOC and the DATA
files in 1 print. I want to include the data 'inline' in
the MASTER.DOC. I started to do this with includeText
(from Insert>File, Insert Link).

This is what the directory would look like:
FOLDER1\
MASTER.DOC
disk-data.txt
cpu-data.txt

FOLDER2\
MASTER.DOC
disk-data.txt
cpu-data.txt

PROBLEMS:
1) The Update Method (Automatic/Manual) in the Edit>Links
dialog are disabled! These links do NOT automatically
update when I open the document. I must manually update
them. The only way I can get Update Method
(Automatic/Manual) enabled is by linking through the
PASTE SPECIAL > AS LINK Method.

2) The Links are FULLY QUALIFIED! (C:/file/folder1/disk-
data.txt) not Relative (./disk-data.txt). Therefore,
when I copy MASTER.DOC to Folder2, the links are still
pointing to Folder1. I have to manually recreate the
links to Folder2 (complicated since I have 6 data files,
and 10 folders). I tried to make it relative through
Edit Field, and changed the link to ./disk-data.txt. I
thought I had it working last night, but now I
get "Error! Not a vlid file name." error.

3) As well, the Links have to be relative since the file
will be accessed BOTH from a WWW Page, as well as a C
Drive. So I cannot fully qualify the links and have it
work in both locations!

I am open to the format of the data files (HTML, TXT,
etc). I may even be open to the format of the MASTER
Document, since I can save WORD as pretty much anything.

The GOAL is just to:
1) Have a Template that will work in different folders
2) Have the actual data appear inline in the MASTER.DOC
MASTER.DOC
MASTER-TEXT1
DISK-DATA-VALUE1
DISK-DATA-VALUE2
DISK-DATA-VALUE3
MASTER-TEXT2
CPU-DATA-VALUE1
CPU-DATA-VALUE2
CPU-DATA-VALUE3
MASTER-TEXT3
3) Have the data updated AUTOMATICALLY when the
MASTER.DOC is opened

Help!
--Jason
 
J

Jason Krug

Graham-

Thank you for the reply... it is nice to see people
actually reading and helping.

I see this saving the same document in multiple places, I
don't see this addressing the Links? All this does is
save the document in multiple locations, I do not see any
proccesing that would redo the links to the new location?

In looking around, I saw this idea which may be closer to
my issue (of relative links):

---------------------------
Can relative file references be used instead of
absolute
(C:\........\filename) such that the "set" can be
transported together?
Using Word 2000.Steve Hudson found a way to do this. It's not exactly
intuitive, and you
can't *see* that the link is relative, but it does work.
Let's see if I
can remember the steps...

1. Start in the Master Doc view

2. Click the button to bring in a file as a sub-doc and
navigate to the
folder location

3. CLOSE the dialog box without actually inserting the
file

4. Go immediately back into the dialog box, select the
file and insert it
as a sub-doc.

Even though the link information appears with an absolute
path, Word
should remember it as "relative". To test, save and close
the documents.
Copy them to a different folder and open the master doc.
Can it find the
sub-doc?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or
reply in the newsgroup and not by e-mail :)
--------------------------------------
 
G

Graham Mayor

I don't think Steve Hudson (who posts as Word heretic) accesses this group,
and Cindy has been away for a while (she'll be back). I have cross posted to
two other groups where one or other of them may be monitoring.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
G

Guest

Graham

Thanx, though I have not seen a post yet with a reply
Cindy did reply to another message that I posted directly in the newgroup from
http://support.microsoft.com/newsgroups/default.aspx, rather tha
http://communities2.microsoft.com/communities/newsgroups/en-us/

OK, I am closer, but still at a lost
1) I cannot get includeTEXT to work, in any form of {INCLUDETEXT "TEST1WWW.htm" \c HTML
In reading a posting, I found that the only way that this would work if it is the default OPEN folder
-------
I've just discovered something about the INCLUDETEXT field & why relative paths sometimes work & sometimes give an error message such as "!Syntax Error" or "Error! Cannot open file." A relative path will work (at least in Word 2000) only if the File/Open... dialog box is set to the same folde
-------

2) Probably for the same reason, I cannot get includeTEXT to work with "..\\Filename.doc" or (all combinations of "." ".." "\" "\\"
-------
Try putting one or two dots in front of the \\ in the sample you show:
...\\Filename.doc
-------

3) I was not able to see the File's Contents (from Print Preview) when using RD. Though I see it would be relative
-------
By: macropod (search by author)

INCLUDETEXT, INCLUDEPICTURE and LINK don't support relative links. RD does, but this can be expressed in absolute terms also. To update link references to take account of folder changes, you might like to check out my 'Fiel
Link Updater', at: http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=26148
-------

4) I was able to get it to work with subdocuments, though it did not work as I would expect
-------
Steve Hudson found a way to do this. It's not exactly intuitive, and you can't *see* that the link is relative, but it does work. Let's see if I can remember the steps...

1. Start in the Master Doc view
2. Click the button to bring in a file as a sub-doc and navigate to the folder location
3. CLOSE the dialog box without actually inserting the file
4. Go immediately back into the dialog box, select the file and insert it as a sub-doc.

Even though the link information appears with an absolute path, Word should remember it as "relative". To test, save and close the documents. Copy them to a different folder and open the master doc. Can it find the sub-doc?
----

5) A Programattic solution
----
FROM: Graham Mayor - Word MV

You could still do it this way by using conditional ref fields eg {IF {RE
Dropdown1} = "Choice1" "{INCLUDETEXT "c:\\path\\Choice1.doc}"}{IF {RE
Dropdown1} = "Choice2" "{INCLUDETEXT "c:\\path\\Choice2.doc}"} et
or you could create a userform to control the gathering of choices se
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.ht
----
Wow Graham, I am impressed, I would not have thought about that! Though this may have some possibilities, this would not work to reference the same directory from a URL-WWW Page, as well as a the C:\ directory (when internet connection is not available
RESULTS
1) People say "Do Not Use Master/Sub Documents unless ABSOLUTELY necessary!" I was told that it 'corrupts files' and is not reliable

2) Everyone says Word does not handle relative links well, especially with Inlcude Text

3) The Master/Sub Document works, but does not show the contents unless I do a PRINT PREVIEW. In default, it shows the SubDocument as a link (as if URL). As well, when I do PRINT PREVIEW, there is a prompt to 'Do you want to include Sub Documents prior to printing" This is CLUMSY and not acceptable for a final solution.

So, is there another solution
Is there a way to fix these issues with the SubDocument
 
G

Graham Mayor

The short answer is I have very little knowledge of working with Word and
html documents. The cross post has broken by your access via the dreadful
web portal. If you are able you would make much better use of these
newsgroups if you accessed the server directly with Outlook Express (or a
preferred news reader) See http://www.gmayor.com/MSNews.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
J

Jason Krug

Graham-

It looks like I have formulated a workable solution with
subdocuments. The last issue I had was the MASTER
Document displayed SUB documents ONLY as a link, not full
content?

I worked around this with a macro:
Sub AutoOpen()
ActiveDocument.Subdocuments.Expanded = Not
ActiveDocument.Subdocuments.Expanded
End Sub

QUESTIONS:
1) ANOTHER WAY?: Is there a way to display the contents
without a MACRO? In order for this to work, we will have
to change Macro Security to allow this to run.

2) NEXT PAGE SECTION BREAK: The SUB documents have a
Section Break before and after. The before section break
is a Next Page break. I would like it to be a Continuous
Page Break. I double-clicked on it, changed it to
continous, but the function and name remained Next Page?
I as well could not delete the Next Page Section break?

Anyone, any advice on THIS (or the original IncludeText
issue below)?
--Jason

--Original Message-

Graham-

Thanx, though I have not seen a post yet with a reply?
Cindy did reply to another message that I posted directly
in the newgroup from:

http://support.microsoft.com/newsgroups/default.aspx,
rather than

http://communities2.microsoft.com/communities/newsgroups/e
n-us/.

OK, I am closer, but still at a lost:
1) I cannot get includeTEXT to work, in any form of
{INCLUDETEXT "TEST1WWW.htm" \c HTML}
In reading a posting, I found that the only way that this
would work if it is the default OPEN folder:
--------
I've just discovered something about the INCLUDETEXT
field & why relative paths sometimes work & sometimes
give an error message such as "!Syntax Error" or "Error!
Cannot open file." A relative path will work (at least in
Word 2000) only if the File/Open... dialog box is set to
the same folder
--------

2) Probably for the same reason, I cannot get includeTEXT
to work with "..\\Filename.doc" or (all combinations
of "." ".." "\" "\\")
--------
Try putting one or two dots in front of the \\ in the
sample you show:
....\\Filename.doc
--------

3) I was not able to see the File's Contents (from Print
Preview) when using RD. Though I see it would be
relative!
--------
By: macropod (search by author)

INCLUDETEXT, INCLUDEPICTURE and LINK don't support
relative links. RD does, but this can be expressed in
absolute terms also. To update link references to take
account of folder changes, you might like to check out
my 'Field
Link Updater', at: http://www.wopr.com/cgi-
bin/w3t/showthreaded.pl?Number=261488
--------

4) I was able to get it to work with subdocuments, though
it did not work as I would expect?
--------
Steve Hudson found a way to do this. It's not exactly
intuitive, and you can't *see* that the link is relative,
but it does work. Let's see if I can remember the
steps...

1. Start in the Master Doc view
2. Click the button to bring in a file as a sub-doc and
navigate to the folder location
3. CLOSE the dialog box without actually inserting the
file
4. Go immediately back into the dialog box, select the
file and insert it as a sub-doc.

Even though the link information appears with an absolute
path, Word should remember it as "relative". To test,
save and close the documents. Copy them to a different
folder and open the master doc. Can it find the sub-doc?
-----

5) A Programattic solution?
-----
FROM: Graham Mayor - Word MVP

You could still do it this way by using conditional ref
fields eg {IF {REF
Dropdown1}
= "Choice1" "{INCLUDETEXT "c:\\path\\Choice1.doc}"}{IF
{REF
Dropdown1}
= "Choice2" "{INCLUDETEXT "c:\\path\\Choice2.doc}"} etc
or you could create a userform to control the gathering
of choices see
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
-----
Wow Graham, I am impressed, I would not have thought
about that! Though this may have some possibilities,
this would not work to reference the same directory from
a URL-WWW Page, as well as a the C:\ directory (when
internet connection is not available)
RESULTS:
1) People say "Do Not Use Master/Sub Documents unless
ABSOLUTELY necessary!" I was told that it 'corrupts
files' and is not reliable?

2) Everyone says Word does not handle relative links
well, especially with Inlcude Text?

3) The Master/Sub Document works, but does not show the
contents unless I do a PRINT PREVIEW. In default, it
shows the SubDocument as a link (as if URL). As well,
when I do PRINT PREVIEW, there is a prompt to 'Do you
want to include Sub Documents prior to printing" This is
CLUMSY and not acceptable for a final solution.

So, is there another solution?
Is there a way to fix these issues with the SubDocument?

..

-----Original Message-----
The short answer is I have very little knowledge of working with Word and
html documents. The cross post has broken by your access via the dreadful
web portal. If you are able you would make much better use of these
newsgroups if you accessed the server directly with Outlook Express (or a
preferred news reader) See http://www.gmayor.com/MSNews.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



http://support.microsoft.com/newsgroups/default.aspx,
rather
http://communities2.microsoft.com/communities/newsgroups/e
n-us/.
= "Choice1" "{INCLUDETEXT "c:\\path\\Choice1.doc}"}{IF
{REF
 
C

Charles Kenyon

Hi,

Sorry, I don't have an answer to your basic question but you may want to
know the following:

"Master Document" is a term of art in Word referring to a "feature" that not
only doesn't work but also destroys documents. The consensus (with the
limited exception of Steve Hudson) among those offering advice on these
newsgroups is that using the Master Document feature is a sure way to
destroy your document. It can destroy parts of your document that you are
not even working on! I think John McGhie said it succinctly when he said
that there are two kinds of Master Documents: Those that are corrupt and
those that will be corrupt soon. See <URL:
http://www.mvps.org/word/FAQs/General/WhyMasterDocsCorrupt.htm> for more
information on what goes wrong, and <URL:
http://www.mvps.org/word/FAQs/General/RecoverMasterDocs.htm> for ideas on
how to salvage what you can.


--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top