M
Marie
Using Word 2000. Data from Access query.
I am getting blank lines from my code where there is not a
second company name and/or a second street address. I
have "suppress blank lines" checked in the mail merge
options. Also, I have studied Knowledge Base Article
264892 but can't figure out how to have my closing bracket
only at the end of the code--and not at the end of each
line. Also, I tried to cut and paste my code here, but it
wouldn't copy as code even though I removed the mail
merge, thus I may have a few minor typos in this
illustrative code, but you should be able to get the idea.
Here is my code: (The "brackets" look like parenthesis on
this screen but I did put them in with Cntl F9 in my
document.)
{If{fldContact1LastNamd}<>"""{fldContact1Title}
{fldContact1FirstNamd } {fldContact1LastName}"{If
{fldContact1Title }="" {If{fldContact1FirstName }
<>'''{fldContact1FirstNamd}"}}"{If{fodContact1LastName}
=""{If{fldContact1FirstName}="" "Purchasing"}}
{MERGEFIELD fldCompanyName}
{If{fldCompanyName@}<>"""{MERGEFIELD fldCompanyName2}"}
{MERGEFIELD fldCompanyMailing}
{If{fldCompanyMailing2}<>"""{fldCompanyMailing2}"}
{MERGEFIELD fldCity}, {MERGEFIELD fldState} {MERGEFIELD
fldZip}
I appreciate the help!
Marie
I am getting blank lines from my code where there is not a
second company name and/or a second street address. I
have "suppress blank lines" checked in the mail merge
options. Also, I have studied Knowledge Base Article
264892 but can't figure out how to have my closing bracket
only at the end of the code--and not at the end of each
line. Also, I tried to cut and paste my code here, but it
wouldn't copy as code even though I removed the mail
merge, thus I may have a few minor typos in this
illustrative code, but you should be able to get the idea.
Here is my code: (The "brackets" look like parenthesis on
this screen but I did put them in with Cntl F9 in my
document.)
{If{fldContact1LastNamd}<>"""{fldContact1Title}
{fldContact1FirstNamd } {fldContact1LastName}"{If
{fldContact1Title }="" {If{fldContact1FirstName }
<>'''{fldContact1FirstNamd}"}}"{If{fodContact1LastName}
=""{If{fldContact1FirstName}="" "Purchasing"}}
{MERGEFIELD fldCompanyName}
{If{fldCompanyName@}<>"""{MERGEFIELD fldCompanyName2}"}
{MERGEFIELD fldCompanyMailing}
{If{fldCompanyMailing2}<>"""{fldCompanyMailing2}"}
{MERGEFIELD fldCity}, {MERGEFIELD fldState} {MERGEFIELD
fldZip}
I appreciate the help!
Marie