Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
Can somebody help me with the correct syntax for the following:
If NAME2 is blank Then NAME1description + ",and" Else NAME1description |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
{ IF { MERGEFIELD NAME2 } = "" "{ MERGEFIELD NAME1description }, and " "{
MERGEFIELD NAME1descript }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and Alt+F9 to toggle their display. -- 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 "Michelle" wrote in message ... Can somebody help me with the correct syntax for the following: If NAME2 is blank Then NAME1description + ",and" Else NAME1descript |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
Thanks for your prompt reply, but unfortunately, I now understand this is not
the result I want, after all. I have 5 mergefields for names ("John Smith", etc) and 5 merge fields for descriptions ("an individual") but don't know in advance how many the record will actually contain. This is what I got using your suggestions: JOHN SMITH, an individual MARY SMITH, an individual an individual, and an individual, and an individual, and an individual, and Here's the result I really need: JOHN SMITH, an individual MARY SMITH, an individual, and So, I always need ", and" after the last name. Is there a way to do this? Sorry about my confused mind! "Doug Robbins - Word MVP" wrote: { IF { MERGEFIELD NAME2 } = "" "{ MERGEFIELD NAME1description }, and " "{ MERGEFIELD NAME1descript }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and Alt+F9 to toggle their display. -- 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 "Michelle" wrote in message ... Can somebody help me with the correct syntax for the following: If NAME2 is blank Then NAME1description + ",and" Else NAME1descript |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
If you always need ", and" after the last name, do not make it part of the
mergefield construction. Simply have it as text in the document. -- 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 "Michelle" wrote in message ... Thanks for your prompt reply, but unfortunately, I now understand this is not the result I want, after all. I have 5 mergefields for names ("John Smith", etc) and 5 merge fields for descriptions ("an individual") but don't know in advance how many the record will actually contain. This is what I got using your suggestions: JOHN SMITH, an individual MARY SMITH, an individual an individual, and an individual, and an individual, and an individual, and Here's the result I really need: JOHN SMITH, an individual MARY SMITH, an individual, and So, I always need ", and" after the last name. Is there a way to do this? Sorry about my confused mind! "Doug Robbins - Word MVP" wrote: { IF { MERGEFIELD NAME2 } = "" "{ MERGEFIELD NAME1description }, and " "{ MERGEFIELD NAME1descript }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and Alt+F9 to toggle their display. -- 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 "Michelle" wrote in message ... Can somebody help me with the correct syntax for the following: If NAME2 is blank Then NAME1description + ",and" Else NAME1descript |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
That was the first thing I tried - the result was spaces before the comma
like this: JOHN SMITH, an individual; MARY SMITH, an individual ,and "Doug Robbins - Word MVP" wrote: If you always need ", and" after the last name, do not make it part of the mergefield construction. Simply have it as text in the document. -- Hope this helps. |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
If then else question
You must have some uneeded spaces in the field construction some where.
-- 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 "Michelle" wrote in message ... That was the first thing I tried - the result was spaces before the comma like this: JOHN SMITH, an individual; MARY SMITH, an individual ,and "Doug Robbins - Word MVP" wrote: If you always need ", and" after the last name, do not make it part of the mergefield construction. Simply have it as text in the document. -- Hope this helps. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Be nice if your suggested answers fit the question. | Microsoft Word Help | |||
Exam question wrong about Word? Opinions, please! | New Users | |||
"Save document" question! | New Users | |||
AutoRecovery Question | Microsoft Word Help | |||
Newbie document question please | New Users |