Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I'm not sure if an IF rule is the right way to do this. I am creating a
Directory Merge, a list of names/addresses/phones/email. Some people have more than one phone (e.g., home and cell). I would like the phones to be on the same line, formatted as follows: 505-555-5555 / 505-555-6666 I right clicked the merge field for the second phone number shown above and chose Edit Field. I selected the "Text to be inserted after:" check box and entered space / space (where "space" is an actual space, not the word space). This works great as long as there is always a value in the first phone number field (I thought there would be but I have some records where there is only a cell, the second phone number field, and no home phone, the first phone number field). So instead of looking like the above example, I get this in that case: / 505-555-6666 I think I need to add the spaces and slash after the first phone number field, but I only want those characters to be used when the second phone number field is not blank. Is that right? If so, can someone help me with formatting the IF rule? PART 2: What is the difference with inserting rules using the Rules drop-down in the Ribbon versus right clicking a merge field and choosing Edit Field? When should I use one over the other - or does it matter? Thanks! |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Use the following field construction:
{ IF { MERGEFIELD Home } "" "{ IF { MERGEFIELD Cell } "" "{ MERGEFIELD Home } / { MERGEFIELD Cell }" "{ MERGEFIELD Home }" }" "{ MERGEFIELD Cell }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and you use Alt+F9 to toggle off 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 "Asinger" wrote in message ... I'm not sure if an IF rule is the right way to do this. I am creating a Directory Merge, a list of names/addresses/phones/email. Some people have more than one phone (e.g., home and cell). I would like the phones to be on the same line, formatted as follows: 505-555-5555 / 505-555-6666 I right clicked the merge field for the second phone number shown above and chose Edit Field. I selected the "Text to be inserted after:" check box and entered space / space (where "space" is an actual space, not the word space). This works great as long as there is always a value in the first phone number field (I thought there would be but I have some records where there is only a cell, the second phone number field, and no home phone, the first phone number field). So instead of looking like the above example, I get this in that case: / 505-555-6666 I think I need to add the spaces and slash after the first phone number field, but I only want those characters to be used when the second phone number field is not blank. Is that right? If so, can someone help me with formatting the IF rule? PART 2: What is the difference with inserting rules using the Rules drop-down in the Ribbon versus right clicking a merge field and choosing Edit Field? When should I use one over the other - or does it matter? Thanks! |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Doug - I understand about using Ctrl-F9 to produce the brackets. When I do
that, Word auto-inserts two spaces so that if I begin typing, my entry is preceded and ended with a space (after/before open/close brackets). Your entry seems to have the spaces too - can you just confirm for me that the spaces are necessary? Also, do I type this directly in my merge document, and where should I type it with respect to the merge fields? Thanks very much. April "Doug Robbins - Word MVP" wrote: Use the following field construction: { IF { MERGEFIELD Home } "" "{ IF { MERGEFIELD Cell } "" "{ MERGEFIELD Home } / { MERGEFIELD Cell }" "{ MERGEFIELD Home }" }" "{ MERGEFIELD Cell }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and you use Alt+F9 to toggle off 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 "Asinger" wrote in message ... I'm not sure if an IF rule is the right way to do this. I am creating a Directory Merge, a list of names/addresses/phones/email. Some people have more than one phone (e.g., home and cell). I would like the phones to be on the same line, formatted as follows: 505-555-5555 / 505-555-6666 I right clicked the merge field for the second phone number shown above and chose Edit Field. I selected the "Text to be inserted after:" check box and entered space / space (where "space" is an actual space, not the word space). This works great as long as there is always a value in the first phone number field (I thought there would be but I have some records where there is only a cell, the second phone number field, and no home phone, the first phone number field). So instead of looking like the above example, I get this in that case: / 505-555-6666 I think I need to add the spaces and slash after the first phone number field, but I only want those characters to be used when the second phone number field is not blank. Is that right? If so, can someone help me with formatting the IF rule? PART 2: What is the difference with inserting rules using the Rules drop-down in the Ribbon versus right clicking a merge field and choosing Edit Field? When should I use one over the other - or does it matter? Thanks! |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
The spaces are not *required*, but as Word's insert field adds them, they
are best inserted for standardisation (e.g. you may wish to use replace on a document so it helps if all are inserted the same way). i.e. { MERGEFIELD Home } and {MERGEFIELD Home} will both work equally well. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Asinger wrote: Doug - I understand about using Ctrl-F9 to produce the brackets. When I do that, Word auto-inserts two spaces so that if I begin typing, my entry is preceded and ended with a space (after/before open/close brackets). Your entry seems to have the spaces too - can you just confirm for me that the spaces are necessary? Also, do I type this directly in my merge document, and where should I type it with respect to the merge fields? Thanks very much. April "Doug Robbins - Word MVP" wrote: Use the following field construction: { IF { MERGEFIELD Home } "" "{ IF { MERGEFIELD Cell } "" "{ MERGEFIELD Home } / { MERGEFIELD Cell }" "{ MERGEFIELD Home }" }" "{ MERGEFIELD Cell }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and you use Alt+F9 to toggle off 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 "Asinger" wrote in message ... I'm not sure if an IF rule is the right way to do this. I am creating a Directory Merge, a list of names/addresses/phones/email. Some people have more than one phone (e.g., home and cell). I would like the phones to be on the same line, formatted as follows: 505-555-5555 / 505-555-6666 I right clicked the merge field for the second phone number shown above and chose Edit Field. I selected the "Text to be inserted after:" check box and entered space / space (where "space" is an actual space, not the word space). This works great as long as there is always a value in the first phone number field (I thought there would be but I have some records where there is only a cell, the second phone number field, and no home phone, the first phone number field). So instead of looking like the above example, I get this in that case: / 505-555-6666 I think I need to add the spaces and slash after the first phone number field, but I only want those characters to be used when the second phone number field is not blank. Is that right? If so, can someone help me with formatting the IF rule? PART 2: What is the difference with inserting rules using the Rules drop-down in the Ribbon versus right clicking a merge field and choosing Edit Field? When should I use one over the other - or does it matter? Thanks! |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Just to add a couple of obscure details to Graham's comment
a. in the very early versions of Windows Word, Word did /not/ insert those extra spaces automatically. I think those extra spaces arrived in Word 6. a. there are at least two places where having a space before the closing brace makes a difference: { MACROBUTTON mymacro mytext }blah displays mytext blah whereas { MACROBUTTON mymacro mytext}blah displays mytextblah and similarly { EQ \l(1,2,3) }blah displays 1,2,3 blah whereas { EQ \l(1,2,3)}blah displays 1,2,3blah There could be others, but for example SET and QUOTE fields do not behave this way. Peter Jamieson "Asinger" wrote in message ... Doug - I understand about using Ctrl-F9 to produce the brackets. When I do that, Word auto-inserts two spaces so that if I begin typing, my entry is preceded and ended with a space (after/before open/close brackets). Your entry seems to have the spaces too - can you just confirm for me that the spaces are necessary? Also, do I type this directly in my merge document, and where should I type it with respect to the merge fields? Thanks very much. April "Doug Robbins - Word MVP" wrote: Use the following field construction: { IF { MERGEFIELD Home } "" "{ IF { MERGEFIELD Cell } "" "{ MERGEFIELD Home } / { MERGEFIELD Cell }" "{ MERGEFIELD Home }" }" "{ MERGEFIELD Cell }" } You must use Ctrl+F9 to insert each pair of field delimiters { } and you use Alt+F9 to toggle off 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 "Asinger" wrote in message ... I'm not sure if an IF rule is the right way to do this. I am creating a Directory Merge, a list of names/addresses/phones/email. Some people have more than one phone (e.g., home and cell). I would like the phones to be on the same line, formatted as follows: 505-555-5555 / 505-555-6666 I right clicked the merge field for the second phone number shown above and chose Edit Field. I selected the "Text to be inserted after:" check box and entered space / space (where "space" is an actual space, not the word space). This works great as long as there is always a value in the first phone number field (I thought there would be but I have some records where there is only a cell, the second phone number field, and no home phone, the first phone number field). So instead of looking like the above example, I get this in that case: / 505-555-6666 I think I need to add the spaces and slash after the first phone number field, but I only want those characters to be used when the second phone number field is not blank. Is that right? If so, can someone help me with formatting the IF rule? PART 2: What is the difference with inserting rules using the Rules drop-down in the Ribbon versus right clicking a merge field and choosing Edit Field? When should I use one over the other - or does it matter? Thanks! |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to replace "enter character" with "space character" in msword | Microsoft Word Help | |||
character map | Microsoft Word Help | |||
Searching for either a character or no character | New Users | |||
When I type a character, the next character is deleted. Why? | Microsoft Word Help | |||
chr(32) space character is a rectangular box character | Microsoft Word Help |