View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JDolman
 
Posts: n/a
Default INCLUDETEXT, numbered paragraphs, extra line

Thanks for the suggestions! I'll try that!

Jason

"macropod" wrote:

Hi,

If the paragraph you're inserting the text into is also outline numbered and
you bookmark the text you want inserted, without bookmarking the last
paragraph marker, that may give you the results you want. To use the
bookmark in the INCLUDETEXT field, the coding would be done something like:
{IF{MERGEFIELD Deposit}= 0 {INCLUDETEXT "C:\\path\\doc1.doc"} {INCLUDETEXT
"C:\\path\\doc2.doc"}" BkMrk}}
where 'BkMrk' is you bookmark's name.

If the paragraph you're inserting the text into isn't outline numbered, the
insertion of the extra paragraph is unavoidable. You can minimise its
effects, however, by adding a paragraph to the one that isn't causing the
problem, then formatting the paragraph the INCLUDETEXT field is attached to
in a 1pt font with no leading/trailing space.

As an aside, I notice that you're using two different documents. You can
have both text blocks in the same document, bookmark both blocks and use a
field constructed like:
{INCLUDETEXT "C:\\path\\doc.doc" {IF{MERGEFIELD Deposit}= 0 BkMrk1 BkMrk2}}
where BkMrk1 and BkMrk2 refer to your bookmarks.

Cheers

--
macropod
[MVP - Microsoft Word]


"JDolman" wrote in message
...
I am using an IF statement to have my mail merge document decide which of

two
INCLUDETEXT statements will be used. One INCLUDETEXTstatement pulls three
numbered (outline) paragraphs from from a different document and inserts

them
into my mailmerge document. Unfortunately, it also adds an extra line

after
the insertion, which must be manually deleted after the merge is complete.
Any ideas?

The IF statement looks like this:
{ IF { MERGEFIELD Deposit } $0.00 "{INCLUDETEXT
"C:\\pathname\\document.doc"}" "{INCLUDETEXT
"C:\\pathname\\otherdocument.doc"}"}