INCLUDETEXT, numbered paragraphs, extra line

J

JDolman

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"}"}
 
M

macropod

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
 
J

JDolman

Thanks for the suggestions! I'll try that!

Jason

macropod said:
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 said:
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"}"}
 

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