If...Then...Else referencing data source and using bookmarks

S

Shelly

We have been sucessfully using the following If...Then...Else statement in a
mail merge word doc for some time now.

{IF {MERGEDFIELD paragraph1} <> "" "{INCLUDETEXT "h:\\0405bookmarks.doc"
{MERGEFIELD paragraph1} \*MERGEFORMAT}" ""}

This statement is repeated one right after the other with a possibility of
11 different paragraphs. It has been working fine. The datasource has a
certain vaule in the mergefield in the place of one of the paragraphs, the
0405bookmarks document is called and a bookmark code that matches the
mergefield inserts a paragraph.

The problem is that most of the time there is only 1 - 3 paragraphs. Lately
we have had instances where 4 or more paragraphs are needed. It will insert
the paragraphs, however, one paragraph will get repeated when 4 or more are
inserted. It's never the same paragraph, it's random which is natural
because the data source would have different codes for different records.

Can anyone figure out why we are getting a duplicate paragraph? Is there
something wrong in our code?

Shelly
 
D

Doug Robbins

Have you tried updating the fields in the document that is produced (Ctrl+a,
F9)? That is quite often necessary when using INCLUDETEXT or INCLUDEPICTURE
in a mailmerge.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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