Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2006

Tip: Looking for answers? Try searching our database.

Mail Merge - If statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nieve - 02 Aug 2006 12:25 GMT
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
Dave Shaw - 02 Aug 2006 12:57 GMT
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

> Hi
>
[quoted text clipped - 12 lines]
>
> Nieve
Nieve - 02 Aug 2006 14:36 GMT
Hi Dave

Thanks a mil.

That worked great!

Nieve

> I would suggest that you insert a field code such as:
>
[quoted text clipped - 24 lines]
> >
> > Nieve
Nieve - 02 Aug 2006 14:41 GMT
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

> I would suggest that you insert a field code such as:
>
[quoted text clipped - 24 lines]
> >
> > Nieve
Dave Shaw - 02 Aug 2006 16:48 GMT
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

> Hi.
>
[quoted text clipped - 38 lines]
> > >
> > > Nieve

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.