I
Ian
An external consultant has fallen ill and won't be back for while. We
need to run a mail merge based on an Excel worksheet output. The mail
merge which our consultant built is designed to insert the entire
contents of the apropriate word document, depending on the criteria and
content of a particular field. The code looks something like this:
{IF"{ FieldOne }" = "criteriaone" {INCLUDETEXT
"C:\\Folder\\document1.doc"\! \*MERGEFORMAT } ""}{IF"{
FieldOne }" = "criteriatwo" {INCLUDETEXT
"C:\\Folder\\document2.doc"\! \*MERGEFORMAT } ""}{IF"{
FieldOne }" = "criteriathree" {INCLUDETEXT
"C:\\Folder\\document3.doc"\! \*MERGEFORMAT } ""}
After a few bugs we managed to get it successfuly merging. The problem
comes in the format of the output text in the merged document. For
example, where document1.doc content is merged, a Heading 1 style one
line paragraph which is followed by normal font turns into two
paragraphs of Heading 1. In another case, the underline of heading 2
is extended under the first two words of the normal style paragraph
that follows.
I've tried creating a new template from scratch, and copying & pasting
special unformatted text into the new template before applying styles
so that both the merge document and the inserted documents share the
identical styles. This didn't seem to make any difference to the
result.
We've got an urgent need to get this out (it's charity fundraising).
Can anyone help, please?
TIA
need to run a mail merge based on an Excel worksheet output. The mail
merge which our consultant built is designed to insert the entire
contents of the apropriate word document, depending on the criteria and
content of a particular field. The code looks something like this:
{IF"{ FieldOne }" = "criteriaone" {INCLUDETEXT
"C:\\Folder\\document1.doc"\! \*MERGEFORMAT } ""}{IF"{
FieldOne }" = "criteriatwo" {INCLUDETEXT
"C:\\Folder\\document2.doc"\! \*MERGEFORMAT } ""}{IF"{
FieldOne }" = "criteriathree" {INCLUDETEXT
"C:\\Folder\\document3.doc"\! \*MERGEFORMAT } ""}
After a few bugs we managed to get it successfuly merging. The problem
comes in the format of the output text in the merged document. For
example, where document1.doc content is merged, a Heading 1 style one
line paragraph which is followed by normal font turns into two
paragraphs of Heading 1. In another case, the underline of heading 2
is extended under the first two words of the normal style paragraph
that follows.
I've tried creating a new template from scratch, and copying & pasting
special unformatted text into the new template before applying styles
so that both the merge document and the inserted documents share the
identical styles. This didn't seem to make any difference to the
result.
We've got an urgent need to get this out (it's charity fundraising).
Can anyone help, please?
TIA