Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
elfmajesty elfmajesty is offline
external usenet poster
 
Posts: 5
Default Word Field in Mail Merge?

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!

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
elfmajesty elfmajesty is offline
external usenet poster
 
Posts: 5
Default Word Field in Mail Merge?

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

"elfmajesty" wrote:

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!

  #3   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 Word Field in Mail Merge?

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

"elfmajesty" wrote in message
...
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

"elfmajesty" wrote:

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!



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
elfmajesty elfmajesty is offline
external usenet poster
 
Posts: 5
Default Word Field in Mail Merge?

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

"Doug Robbins - Word MVP" wrote:

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

"elfmajesty" wrote in message
...
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

"elfmajesty" wrote:

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!




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word Field in Mail Merge?

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

"elfmajesty" wrote in message
...
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

"Doug Robbins - Word MVP" wrote:

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

"elfmajesty" wrote in message
...
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

"elfmajesty" wrote:

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!






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 97 in Windows XP to maintain formatting Charlie''s Word VBA questions Microsoft Word Help 22 May 20th 23 08:51 PM
Need help with Field Codes Rhino New Users 16 June 19th 06 06:06 AM
Editing Mail Merge Recipients Stan W. Mailmerge 8 May 4th 06 05:03 AM
Format Fractions in Mail Merge. John McGhie [MVP - Word and Word Macintosh] Mailmerge 4 March 22nd 06 08:55 AM
Possible to insert a file into Word based on a mail merge field? Mark Mailmerge 1 January 13th 06 02:50 PM


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