MS Office Forum / Word / Mailmerge and Fax / December 2007
IncludeText Problem
|
|
Thread rating:  |
Tom Bean - 03 Dec 2007 22:16 GMT Occasionaly, a user has an included document open in Word while a mail merge is running. This causes the mail merge to open a message box with "Open document read-only?" The main document is opened read-only so I thougth all the attachments would be opened read-only too. But apparently not.
Is there any setting for INCLUDETEXT or for the Word application, like DisplayAlerts, to prevent this message box?
Thanks, Tom
macropod - 04 Dec 2007 07:32 GMT hi Tom,
You could try adding the \! switch. This prevents the INCLUDETEXT field updating cross-references imported from the source document, which may be all you need.
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> Occasionaly, a user has an included document open in Word while a mail merge is running. This causes the mail merge to open a > message box with "Open document read-only?" The main document is opened read-only so I thougth all the attachments would be [quoted text clipped - 4 lines] > Thanks, > Tom Tom Bean - 04 Dec 2007 15:45 GMT macropod,
The documents I am including have MERGEFIELDs in them also. Will the MERGEFIELDs be updated in I use the switch?
Thanks, Tom
> hi Tom, > [quoted text clipped - 14 lines] >> Thanks, >> Tom macropod - 04 Dec 2007 19:16 GMT Hi Tom,
Provided you put in switch in the INCLUDETEXT field and not the MERGEIELD, I would expect so.
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> macropod, > [quoted text clipped - 22 lines] >>> Thanks, >>> Tom Tom Bean - 04 Dec 2007 22:44 GMT macropod,
I tried putting the \! switch in one of the INCLUDETEXT fields and I still got the prompt to open a read-only copy and I also had an "Error! Bookmark not defined" error for every merge field in the included document.
At this point, I don't guess there's anything to do to prevent the 'read-only' prompt.
Thanks, Tom
> Hi Tom, > [quoted text clipped - 28 lines] >>>> Thanks, >>>> Tom macropod - 05 Dec 2007 08:40 GMT Hi Tom,
Can you post your field coding? You'll need to copy the text out of the fields and type the braces into your newsreader.
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> macropod, > [quoted text clipped - 40 lines] >>>>> Thanks, >>>>> Tom Tom Bean - 06 Dec 2007 17:31 GMT macropod,
Here's an example of a merge field to include a document:
{ INCLUDETEXT "Agreement.doc" }
Tom
> Hi Tom, > [quoted text clipped - 47 lines] >>>>>> Thanks, >>>>>> Tom macropod - 06 Dec 2007 21:07 GMT Hi Tom,,
Where's the MERGEFIELD? If it's not used to tell the INCLUDETEXT field which document to import, then the solution should be as simple as { INCLUDETEXT "Agreement.doc" \!}
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> macropod, > [quoted text clipped - 45 lines] >>>>>>> Thanks, >>>>>>> Tom Tom Bean - 07 Dec 2007 15:24 GMT macropod,
The INCLUDETEXT actually has the UNC path to the file rather than just a file name and in some cases it does contain a MERGEFIELD that defines the path. However, the test I ran with the \l switch was the simplest of cases, where the document's path was completely specified, and it didn't update any of the MERGEFIELDs in the inluded document.
Tom
> Hi Tom,, > [quoted text clipped - 62 lines] >>>>>>>> Thanks, >>>>>>>> Tom macropod - 07 Dec 2007 19:42 GMT Hi Tom,
Do you mean to say you've got a mailmerge document with MERGEFIELDs embedded in INCLUDETEXT fields like: '{INCLUDETEXT "{MERGEFIELD DocPath"}Agreement.doc"}' where the DocPath is something like '../Server/MainPath/LocalPath/' and the document thus imported contains yet more mergefields?
I don't believe that will work.What I think you'll need to do is to go into the source document that is imported via your INCLUDETEXT field and bookmark the material either side of its MERGEFIELDs (multiple bookmarks will be needed), then code your mailmerge document like: '{INCLUDETEXT "{MERGEFIELD DocPath"}Agreement.doc" BkMrk1}' and '{INCLUDETEXT "{MERGEFIELD DocPath"}Agreement.doc" BkMrk2}' where BkMrk1 and BkMrk2 are your bookmark names, then insert the MERGEFIELD you presently have in your INCLUDETEXT source document between the new pair of MERGEFIELDs in your mailmerge document.
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> macropod, > [quoted text clipped - 59 lines] >>>>>>>>> Thanks, >>>>>>>>> Tom Tom Bean - 07 Dec 2007 20:13 GMT micropod,
I do have INCLUDETEXT statements with MERGEFIELDs to specify the document path, for example:
{INCLUDETEXT "{ MERGEFIELD DocumentPath }Agreement.doc" } where DocumentPath is something like: \\ServerName\ShareName\DirectoryName\.
I have been sending mail merge documents containing these types of fields for over 2 years by both eMail and fax. One of my main documents attaches 10 other documents all with mail merge fields. These documents are sent by an automated process running on a server.
The only problems I've encountered are when Word pops a message box expecting a button to be clicked which mainly happens when a user has one of the included documents open.
Tom
> Hi Tom, > [quoted text clipped - 92 lines] >>>>>>>>>> Thanks, >>>>>>>>>> Tom macropod - 08 Dec 2007 03:10 GMT Tom,
I take it from your response the INCLUDETEXT document doesn't have yet more mergefields.
Also, this is the first mention you've made of users having the source document open. That changes everything. It's hardly surprising Word gives you a prompt in such cases, since it's impossible for Word to know what the correct response is. Adding the \! switch thus: {INCLUDETEXT "{ MERGEFIELD DocumentPath }Agreement.doc" \!} (not the \1 switch you mentioned earlier) *might* overcome the issue you're having with this, but you really should consider the wisdom of executing the mailmerge when the INCLUDETEXT document is open - and possibly being edited. Imagine, for a moment, what would happen if the user updates & saves the document while your mailmerge is running.
Is there anything else you haven't told me that might be relevant?
Cheers
 Signature macropod [MVP - Microsoft Word] -------------------------
> micropod, > [quoted text clipped - 91 lines] >>>>>>>>>>> Thanks, >>>>>>>>>>> Tom Tom Bean - 14 Dec 2007 19:55 GMT macropod,
I appologize for not getting back to you sooner.
My INCLUDETEXT documents do have MERGEFIELDs. I must have misstated my problem. It's not the main (source) document users open, the problem occurs when they open the included documents. And, the users don't have change permission because the directories and files are read-only for normal users, however, Word doesn't seem to realize the user with the document open can't save it because it always opens for edit.
We solved the problem by duplicating the directory containing the documents and tightening permissions so users cannot access the documents used by mail merge. This may not be the best way but at least the Word doesn't get hung because a user has one of the documents open.
Tom
> Tom, > [quoted text clipped - 131 lines] >>>>>>>>>>>> Thanks, >>>>>>>>>>>> Tom
|
|
|