INCLUDETEXT and Mail Merging

S

Shay

When I am doing a mail merge I want to use INCLUDETEXT to include all the
contents of a document in a certain location. This location is stored in the
database and read in as part of the mail merge. The mailmerge field name is
say «EndorsementFileName»

however I want to be able to use the Merge field embedded in the Include
text so that

{INCLUDETEXT {MERGEFIELD «EndorsementFileName»\*MERGEFORMAT}}

results in

{INCLUDETEXT "C:\\RICS ASBESTOS RISKS CLAUSE.doc"}

after the merge and I have the merge data and the included file in the
resulting document.
 
S

Shay

Basically my question is why the following syntax does not work and is it
possible to do what I am trying to do?

{INCLUDETEXT "{MERGEFIELD EndorsementFileContents}"}
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2hheQ==?=,
Basically my question is why the following syntax does not work and is it
possible to do what I am trying to do?

{INCLUDETEXT "{MERGEFIELD EndorsementFileContents}"}
It should work, but you may not have some of the details quite right.

1. Version of Word

2. Please describe how it is currently NOT working

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :)
 
S

Shay

The Version of word is 2002 (10.6612.6735) SP3. The message I get is first 'a
Field calculation error has occurred in record 1' followed by

'Error! not a Valid Filename' on the word doc where the fieldcode to include
the file is.
I have tried c:\\Test.doc and c:\Test.doc formats in the datasource but with
no joy. I am suspicious now that it may be some sort of secuity setting that
needs to be in the registry (see article
http://support.microsoft.com/default.aspx?scid=kb;en-us;330554) but it still
does not work when I set the FieldCalcSecurityLevel to 0.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2hheQ==?=,
The Version of word is 2002 (10.6612.6735) SP3. The message I get is first 'a
Field calculation error has occurred in record 1' followed by
1. Please NEVER send files unless explicitly requested to do so. And anyway,
without the data source, it's not possible to trouble-shoot something of this
nature. (And no, please do NOT send me an mdb file)

2. You need to have double-backslashes in the file path coming across from the
database. But note that you will NOT see the correct information in the main
merge document; perform this step last, immediately before executing the merge,
to avoid seeing errors. You'd need first to merge to a new document, then update
the field codes (Ctrl+A, F9, Alt+F9). Then it ought to work correctly.

3. Be careful to remove \* Mergeformat. And make sure "Update links on save" is
NOT activated in Tools/Options/General/Web options/Files.
'Error! not a Valid Filename' on the word doc where the fieldcode to include
the file is.
I have tried c:\\Test.doc and c:\Test.doc formats in the datasource but with
no joy. I am suspicious now that it may be some sort of secuity setting that
needs to be in the registry (see article
http://support.microsoft.com/default.aspx?scid=kb;en-us;330554) but it still
does not work when I set the FieldCalcSecurityLevel to 0.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :)
 

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

Top