Link to home
Start Free TrialLog in
Avatar of kamleshmistry
kamleshmistry

asked on

Trouble with IncludeText.

I created the jaja bookmark in the C:\What.doc document by highlighting some text, then inserting a bookmark.  If I open up What.doc, and go to the bookmark jaja, I will see the highlighted text.

I save this file (What.doc), and then I create a new file.

I include the contents of another file by selecting from the menu:
Insert --> Field

Select IncludeText

In the URL: text box, I type, "C:\What.doc" jaja
because jaja is the bookmark'd text that I want to include.

I see 'Error! Not a valid filename.'
message.

Not sure why.

Furthermore, say I include the entire What.doc without any bookmarks.
When I toggle to see the field, by pressing Alt+F9 after setting my mouse cursor and clicking into the pasted text, then I see something very weird:

{ INCLUDETEXT  "\"C:\\What.doc\""..\* MERGEFORMAT }

Not sure I really understand it.

But I figure, what the heck, I will insert the bookmark after doc\" by just typing it in;
So I modify this inludetext to look like this:
{ INCLUDETEXT  "\"C:\\What.doc\" jaja "..\* MERGEFORMAT }

Then I press Alt+F9 to exit this view
When I finish, I see the whole document, not just my jaja bookmared entry....

I am confused about this....

All I want to do is be able to bookmark a certain text entry in another document, and then paste it in a different document in such a way that if the original document changes, the other document can quickly refresh view, and see the changes made....










Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

You seem to have some extra backslashes.

I would expect to see

{ INCLUDETEXT  "C:\\What.doc" jaja \* MERGEFORMAT }
Avatar of kamleshmistry
kamleshmistry

ASKER

No, that is what it shows,
C: backslash backslash What.doc

Looked weird to me to, but that's what it did...
The doubled backslashes in the file path are normal and necessary because the character has a special meaning in a Word field as we see in \* MERGEFORMAT.

It is the extra \ and quotes before and after the file patch that don't look right.
'file path', not 'file patch'
This is the real answer:

Purpose:  This short guide will describe how to use Include fields in Microsoft Word.  The reason for this guide is that Include fields are slightly buggy in Microsoft Word, and this guide exists to.....


1.      Highlight text in source document that you want to paste in destination document
2.      Insert bookmark in source document and name the book mark meaningfully.
3.      Save the file
4.      Open the destination document.
5.      Insert cursor where actual insert is to occur.
6.      Insert à Field, pick IncludeText
7.      In the URL file, type ..\Path\Mydocument.doc BookMarkName
8.      You will see Error! Not a valid filename, but do not worry; this is a Word problem.
9.      Click on the Error message.
10.      Right Click and select Toggle Field Code
11.      Change the IncludeText as per your desire; {INCLUDETEXT  C:\\Filename.doc Bookmarkname}
12.      Notice the double \\ after C:
13.      Press f9 to refresh
14.      You wont see anything change
15.      Right click and toggle back to normal view.
16.      If you still see error, right click and update field.


I will keep this question open.
If anybody has a better answer they may post.
If not, Graham will get the points....
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial