Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Stukmeister
 
Posts: n/a
Default Conditionally print outlook company in mail merge

I am using MS Outlook Contacts with MS Word to mail merge envelopes. I need
to print the Company name line if the "Mailing Address" is a business
address. If the "Mailing Address" is a home address, I don't want to print
the Company name line.

A potential programatic solution would be: If MailingAddress =
BusinessAddress then print Company address line, else don't print Company
address line. I just don't know how to code it in Word.

Anyone know how to solve this?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Conditionally print outlook company in mail merge

First, to do this, you must be using the individual address fields, not the
ADDRESSBLOCK field.

Then, to do what you said, you need something like

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Business_Address_Street" } "" }

but I wonder if you actually need:

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Company" } "" }

To insert these nested fields, use ctrl-F9 to insert the pairs of special
field braces {}, and type everything else in between. There are other ways
to do it, but I think that's the most straightforward.

To do either of those, you will probably need to initiate your merge from
Outlook, because you may not get the same fields if you connect using the
Outlook Contacts option in the Word Merge Wizard.

Peter Jamieson


"Stukmeister" wrote in message
...
I am using MS Outlook Contacts with MS Word to mail merge envelopes. I need
to print the Company name line if the "Mailing Address" is a business
address. If the "Mailing Address" is a home address, I don't want to print
the Company name line.

A potential programatic solution would be: If MailingAddress =
BusinessAddress then print Company address line, else don't print Company
address line. I just don't know how to code it in Word.

Anyone know how to solve this?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Stukmeister
 
Posts: n/a
Default Conditionally print outlook company in mail merge

This works fine except that I also don't want to print the "Company" line of
the address if the mailing address and business address are not the same. The
way it is now, it prints a blank line in the address.

"Peter Jamieson" wrote:

First, to do this, you must be using the individual address fields, not the
ADDRESSBLOCK field.

Then, to do what you said, you need something like

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Business_Address_Street" } "" }

but I wonder if you actually need:

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Company" } "" }

To insert these nested fields, use ctrl-F9 to insert the pairs of special
field braces {}, and type everything else in between. There are other ways
to do it, but I think that's the most straightforward.

To do either of those, you will probably need to initiate your merge from
Outlook, because you may not get the same fields if you connect using the
Outlook Contacts option in the Word Merge Wizard.

Peter Jamieson


"Stukmeister" wrote in message
...
I am using MS Outlook Contacts with MS Word to mail merge envelopes. I need
to print the Company name line if the "Mailing Address" is a business
address. If the "Mailing Address" is a home address, I don't want to print
the Company name line.

A potential programatic solution would be: If MailingAddress =
BusinessAddress then print Company address line, else don't print Company
address line. I just don't know how to code it in Word.

Anyone know how to solve this?




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Conditionally print outlook company in mail merge

As long as the comparison does what you need, it's then up to you what you
put in the "results", e.g.

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }"
"{ MERGEFIELD "Company" }
{ MERGEFIELD "Mailing_Address" }"
"{ Mergefield "Mailing_Address_Street" }
whatever else you need" }

or whatever. If you want to suppress blank lines that occur as a result of
the IF field, in Word 2002/2003 you have do a bit more - ask if that's what
you need, or search this newsgroup as this question comes up quite
frequently.

Peter Jamieson


"Stukmeister" wrote in message
...
This works fine except that I also don't want to print the "Company" line
of
the address if the mailing address and business address are not the same.
The
way it is now, it prints a blank line in the address.

"Peter Jamieson" wrote:

First, to do this, you must be using the individual address fields, not
the
ADDRESSBLOCK field.

Then, to do what you said, you need something like

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Business_Address_Street" } "" }

but I wonder if you actually need:

{ IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }" "{ MERGEFIELD "Company" } "" }

To insert these nested fields, use ctrl-F9 to insert the pairs of special
field braces {}, and type everything else in between. There are other
ways
to do it, but I think that's the most straightforward.

To do either of those, you will probably need to initiate your merge from
Outlook, because you may not get the same fields if you connect using the
Outlook Contacts option in the Word Merge Wizard.

Peter Jamieson


"Stukmeister" wrote in message
...
I am using MS Outlook Contacts with MS Word to mail merge envelopes. I
need
to print the Company name line if the "Mailing Address" is a business
address. If the "Mailing Address" is a home address, I don't want to
print
the Company name line.

A potential programatic solution would be: If MailingAddress =
BusinessAddress then print Company address line, else don't print
Company
address line. I just don't know how to code it in Word.

Anyone know how to solve this?






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print 2 half-sheet mail merge docs on one sheet of paper Sue Microsoft Word Help 7 April 27th 23 08:49 AM
No print option in Step 6 of Directory mail merge Kokomojo Mailmerge 3 February 9th 06 07:15 PM
Print envelops from a mail merge document Jim Mailmerge 7 June 21st 05 05:33 AM
Can't print a mail merge data base doc ohiomasons Mailmerge 1 April 30th 05 10:50 PM
How do I print a mail merge data source without the main document Lynn A Mailmerge 0 January 21st 05 10:39 AM


All times are GMT +1. The time now is 03:05 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"