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 / July 2006

Tip: Looking for answers? Try searching our database.

Word Field in Mail Merge?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
elfmajesty - 18 Jul 2006 22:28 GMT
Hello.  I have an easy one - just can't remember how to do it!!  I have
created a mail merge Label and set up my fields.  We are including the Title
field in our set-up.  However, some of the data does not use the Title field
(i.e. Mr. John Doe - [Title First Last] versus Jane Smith - [First Last]).  I
need to use (I think!) the If-Then-Else to say if the Title field is blank,
move to the First Name field and DO NOT leave a blank space.  What we are
getting right now after the merge is show below.

Mr. John Doe
123 Some Street
City, State  Zip

 Jane Smith
123 Some Street
City, State  Zip

(Note the space where the Title field should be)

We need:

Mr. John Doe
123 Some Street

Jane Smith
123 Some Street

Can someone help me out??  
Thanks!
elfmajesty - 18 Jul 2006 23:02 GMT
By the way, I am using Graham's website advice and have formatted the first
line as follows:

{MERGEFIELD "Title"}{IF {MERGEFIELD "Title"}= "" "" " "} {MERGEFIELD
"FirstName"} {MERGEFIELD "LastName"}

and I am getting as a result:

Mr.MERGEFIELD John Doe

> Hello.  I have an easy one - just can't remember how to do it!!  I have
> created a mail merge Label and set up my fields.  We are including the Title
[quoted text clipped - 24 lines]
> Can someone help me out??  
> Thanks!
Doug Robbins - Word MVP - 19 Jul 2006 04:42 GMT
You should be using:

{IF {MERGEFIELD "Title"}= "" "{MERGEFIELD  "FirstName"} {MERGEFIELD
"LastName"}" "{MERGEFIELD "Title"} {MERGEFIELD  "FirstName"} {MERGEFIELD
"LastName"}" }

You must use Ctrl+F9 for each pair of field delimiters.
Signature

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

> By the way, I am using Graham's website advice and have formatted the
> first
[quoted text clipped - 39 lines]
>> Can someone help me out??
>> Thanks!
elfmajesty - 19 Jul 2006 16:41 GMT
Doug,
Thank you for your post.  I see what you are I'm very familiar with ctl+F9
but I'm not sure I understand what you mean about EACH pair.  Does that mean
I will have to highlight the whole string when finished and ctl+F9 that to
enclose it?  So, if I'm reading correctly, in your example I would need to do
the ctl+F9 seven (7) times.  I've done this and I am still getting strange
results.

Also, I seem to recall this being MUCH easier in Word 2000.  I noticed in
Word 2003 on the Mail Merge toolbar that I have the Insert Word Field button.
That brings me to the IF-THEN-ELSE wizard.  Can I use that to write the
statement?  What's throwing me is the "Compare To" section (see below)

If:
Field Name:  [Title]
Comparison:  [is blank]
Compare to: [what do I put here?]
Then:
Insert Text: [which I want to be the FirstName field]
Otherwise: [which I want to be the Title field plus a space]

Thanks for any advice.  I'm continuing to work on this.
Elf

> You should be using:
>
[quoted text clipped - 46 lines]
> >> Can someone help me out??
> >> Thanks!
Peter Jamieson - 19 Jul 2006 18:49 GMT
> but I'm not sure I understand what you mean about EACH pair.

Doug simply means that the {} need to be the special field code braces that
you can insert using ctrl-F9, not the ordinary characters "{" and "}".  And
yes, I count 7 pairs in the construciton he gave you. If you have already
inserted them by other means, that's fine.

However, if your code only needs to work in Word 2003 (and maybe 2002) then
there is another approach to dealing with spaces in some scenarios, which is
to use the \b and \f switches in the MERGEFIELD field, e.g.:

{ MERGEFIELD Title \f " " }{ MERGEFIELD First \f " " }{ MERGEFIELD Last }

The reason most people here prefer to use the "direct approach" to inserting
fields is probably because then you have precise control over what you're
doing.

Peter Jamieson

> Doug,
> Thank you for your post.  I see what you are I'm very familiar with ctl+F9
[quoted text clipped - 75 lines]
>> >> Can someone help me out??
>> >> Thanks!
 
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.