Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nieve Nieve is offline
external usenet poster
 
Posts: 4
Default Mail Merge - If statement

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dave Shaw Dave Shaw is offline
external usenet poster
 
Posts: 6
Default Mail Merge - If statement

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options, view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nieve Nieve is offline
external usenet poster
 
Posts: 4
Default Mail Merge - If statement

Hi Dave

Thanks a mil.

That worked great!

Nieve



"Dave Shaw" wrote:

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options, view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve

  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nieve Nieve is offline
external usenet poster
 
Posts: 4
Default Mail Merge - If statement

Hi.

I actually had to fiddle around with the code.

The correct code is

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
€śContact Name€ť}
"}

It worked great anyhow!

Nieve






"Dave Shaw" wrote:

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options, view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dave Shaw Dave Shaw is offline
external usenet poster
 
Posts: 6
Default Mail Merge - If statement


The mergefields that you are doing the conditional argument on and the
result would normally be the same. By putting in a line break at the end of
the 'else' part will result in an additional line break if this condition is
met.

Anyway glad to be of help


"Nieve" wrote:

Hi.

I actually had to fiddle around with the code.

The correct code is

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
€śContact Name€ť}
"}

It worked great anyhow!

Nieve






"Dave Shaw" wrote:

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options, view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve



  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Noel Noel is offline
external usenet poster
 
Posts: 30
Default Mail Merge - If statement

I have a mail merge letter that pulls information from an access database. I
need to put in an IF statement that says if the type of purchase is buy back,
then it is to mail merge the amount in the Buy Back merge field, if it's a
Buy In, then it needs to merge it into the Buy In merge field. The amounts
pull from the same field in access.

Thanks

"Dave Shaw" wrote:


The mergefields that you are doing the conditional argument on and the
result would normally be the same. By putting in a line break at the end of
the 'else' part will result in an additional line break if this condition is
met.

Anyway glad to be of help


"Nieve" wrote:

Hi.

I actually had to fiddle around with the code.

The correct code is

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
€śContact Name€ť}
"}

It worked great anyhow!

Nieve






"Dave Shaw" wrote:

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager" "{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options, view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No Contact'. I
want to set a rule in the mail merge template that says when the data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The Manager') in
excel (where the data is stored), or when the mail merge is completed. This
is not a solution however, as I simply need the template to do it for me).

Thanks

Nieve

  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Elijah Taylor Elijah Taylor is offline
external usenet poster
 
Posts: 1
Default Mail Merge - If statement

Noel wrote:
I have a mail merge letter that pulls information from an access database. I
need to put in an IF statement that says if the type of purchase is buy back,
then it is to mail merge the amount in the Buy Back merge field, if it's a
Buy In, then it needs to merge it into the Buy In merge field.


*snip*

I would probably do this by creating a query in Access which did the
same thing, and then setting up my Mail-Merge off the newly created
query. Just another way to do it, sorry if its not applicable to your
situation.

--
Elijah Taylor

  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail Merge - If statement

To do it in the mailmerge main document, in the where you have (or would
have the Buy Back) merge field, use

{ IF { MERGEFIELD PurchaseType } = "Buy Back" { MERGEFIELD Amount } }

and where you have (or would have the Buy In) merge field, use

{ IF { MERGEFIELD "PurchaseType } = "Buy In" { MERGEFIELD Amount } }

or something similar. You must use Ctrl+F9 to insert each pair of field
delimiters { }.

--
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

"Noel" wrote in message
...
I have a mail merge letter that pulls information from an access database.
I
need to put in an IF statement that says if the type of purchase is buy
back,
then it is to mail merge the amount in the Buy Back merge field, if it's a
Buy In, then it needs to merge it into the Buy In merge field. The amounts
pull from the same field in access.

Thanks

"Dave Shaw" wrote:


The mergefields that you are doing the conditional argument on and the
result would normally be the same. By putting in a line break at the end
of
the 'else' part will result in an additional line break if this condition
is
met.

Anyway glad to be of help


"Nieve" wrote:

Hi.

I actually had to fiddle around with the code.

The correct code is

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager"
"{MERGEFIELD
"Contact Name"}
"}

It worked great anyhow!

Nieve






"Dave Shaw" wrote:

I would suggest that you insert a field code such as:

{ IF {MERGEFIELD Contact Name} = "No Contact" "The Manager"
"{MERGEFIELD
Contact Name}"}

To do the above ensure you can see field codes - Tools, Options,
view, field
codes, and insert the {} using Ctrl + F9

Hope this helps

Dave

"Nieve" wrote:

Hi

I have a mail merge letter to send to potential clients.

Some of the data in one merge field (Contact Name) is 'No
Contact'. I
want to set a rule in the mail merge template that says when the
data 'No
Contact' is merged it is replaced with 'The Manager'. Is there a
way of doing
this?


(I know I could do Find and Replace ('No Contact' with 'The
Manager') in
excel (where the data is stored), or when the mail merge is
completed. This
is not a solution however, as I simply need the template to do it
for me).

Thanks

Nieve



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
NO CODE - mail merge to Outlook with attachment with CC BrianH Mailmerge 1 February 10th 10 02:53 PM
Mail Merge Losing Data Scott May Mailmerge 1 November 1st 05 11:03 PM
Mail Merge - Next Record If Statement HiramPat Mailmerge 5 April 22nd 05 04:03 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 01:31 PM


All times are GMT +1. The time now is 06:28 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"