Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heliotrope
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes countr

This question derives from the helpful exchange "Conditionally print outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD "Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country from
Business_Address before making the comparison?

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes countr

There is no way that you are going to be able to do that with mailmerge.
You maybe able to do something with a Catalog (or Directory) type mailmerge
main document that you would use to create a Word document containing all of
the data and then do some processing on the contents of that document and
then use it as the data source for a mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print
outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address
includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country
from
Business_Address before making the comparison?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heliotrope
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes co

well --- Thanks! Glad I asked - you saved me much time barking up a wrong tree.

"Doug Robbins - Word MVP" wrote:

There is no way that you are going to be able to do that with mailmerge.
You maybe able to do something with a Catalog (or Directory) type mailmerge
main document that you would use to create a Word document containing all of
the data and then do some processing on the contents of that document and
then use it as the data source for a mailmerge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print
outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address
includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country
from
Business_Address before making the comparison?




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes countr

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field to
disregard it.

An IF test with a wildcard will do the trick. The field construction is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print

outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address

includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD

"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country

from
Business_Address before making the comparison?



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heliotrope
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes co

Thank you very much. Unfortunately, I could not get this suggestion to work,
though I tried several permutations in addition. I get inconsistent results -
even one where with no business address at all the compnay name showed up. (I
know that's odd) Could this have to do with the character set? I noticed the
Word file conversion dialogue shows Unicode.

Thanks!

"macropod" wrote:

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field to
disregard it.

An IF test with a wildcard will do the trick. The field construction is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print

outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address

includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD

"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country

from
Business_Address before making the comparison?






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes co

Hi Heliotrope,

The fact you got a case where with no business address at all the company
name showed up suggests there may be something wrong with your data source.
There's no reason I can see why the code would work as advertised. The
presence of Unicode characters shouldn't change that, though I admit I don't
quite know how Word treats them if they appear in the data preceding the
country.

Cheers

--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
Thank you very much. Unfortunately, I could not get this suggestion to

work,
though I tried several permutations in addition. I get inconsistent

results -
even one where with no business address at all the compnay name showed up.

(I
know that's odd) Could this have to do with the character set? I noticed

the
Word file conversion dialogue shows Unicode.

Thanks!

"macropod" wrote:

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field to
disregard it.

An IF test with a wildcard will do the trick. The field construction is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print

outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address

includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD

"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country

from
Business_Address before making the comparison?






  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heliotrope
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes co

Well, thanks anyway. Exchange Server/ Outlook 2003 otherwise seem solid.

"macropod" wrote:

Hi Heliotrope,

The fact you got a case where with no business address at all the company
name showed up suggests there may be something wrong with your data source.
There's no reason I can see why the code would work as advertised. The
presence of Unicode characters shouldn't change that, though I admit I don't
quite know how Word treats them if they appear in the data preceding the
country.

Cheers

--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
Thank you very much. Unfortunately, I could not get this suggestion to

work,
though I tried several permutations in addition. I get inconsistent

results -
even one where with no business address at all the compnay name showed up.

(I
know that's odd) Could this have to do with the character set? I noticed

the
Word file conversion dialogue shows Unicode.

Thanks!

"macropod" wrote:

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field to
disregard it.

An IF test with a wildcard will do the trick. The field construction is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print
outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address
includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the country
from
Business_Address before making the comparison?







  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Compare Mailing_Address with Business_Address that includes co

One thing to look out for is a 128-ish character limit on comparisons - that
would be a lot for addresses but it depends on how much is in the address.

Peter Jamieson
"macropod" wrote in message
...
Hi Heliotrope,

The fact you got a case where with no business address at all the company
name showed up suggests there may be something wrong with your data
source.
There's no reason I can see why the code would work as advertised. The
presence of Unicode characters shouldn't change that, though I admit I
don't
quite know how Word treats them if they appear in the data preceding the
country.

Cheers

--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
Thank you very much. Unfortunately, I could not get this suggestion to

work,
though I tried several permutations in addition. I get inconsistent

results -
even one where with no business address at all the compnay name showed
up.

(I
know that's odd) Could this have to do with the character set? I noticed

the
Word file conversion dialogue shows Unicode.

Thanks!

"macropod" wrote:

Hi Heliotrope,

Actually, you don't need to *remove* the country from Business_Address
before making the comparison. All you need to do is to code the field
to
disregard it.

An IF test with a wildcard will do the trick. The field construction
is:
{IF{MERGEFIELD Business_Address}= "{ MERGEFIELD Mailing_Address }*"
{MERGEFIELD "Company"}}

Cheers
--
macropod
[MVP - Microsoft Word]


"Heliotrope" wrote in message
...
This question derives from the helpful exchange "Conditionally print
outlook
company in mail merge (4/22/06)."

I tried the suggested solution but found that when Business_Address
includes
the country, the routine fails. Here's the key part:
{IF "{ MERGEFIELD "Mailing_Address" }" = "{ MERGEFIELD
"Business_Address" }"
"{MERGEFIELD "Company"}. How do I programatically remove the
country
from
Business_Address before making the comparison?








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
Word Compare and Merge Document Function EricM Microsoft Word Help 2 March 28th 05 11:53 PM


All times are GMT +1. The time now is 08:25 AM.

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"