Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
How do I hide a mail merge field if it meets a certain condition (can I use
the IF statement, if so how?)? For instance if STATE="California" then I want the mail merge field (i.e. State Abbreviation) to show, if not, I do not want it visible. |
#2
![]() |
|||
|
|||
![]()
That is what the IF field is for.
{ IF {MergeField "State" } = "California" "CA" } Didn't see the sense of including another mergefield if the only state is California, if you need the mergefield, insert that instead. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "theryno" wrote in message ... How do I hide a mail merge field if it meets a certain condition (can I use the IF statement, if so how?)? For instance if STATE="California" then I want the mail merge field (i.e. State Abbreviation) to show, if not, I do not want it visible. |
#3
![]() |
|||
|
|||
![]()
I guess I should not have used State Abbrev as an example.
If the state is California, I would want to show the division number, otherwise show nothing. Would I then use: { IF {MergeField "State" } = "California" Division_No }? THANK YOU!!! "Charles Kenyon" wrote: That is what the IF field is for. { IF {MergeField "State" } = "California" "CA" } Didn't see the sense of including another mergefield if the only state is California, if you need the mergefield, insert that instead. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. |
#4
![]() |
|||
|
|||
![]()
I would use:
{ IF {MergeField "State" } = "California" {MergeField Division_No} } I definitely like to make my MergeField and Ref field references explicit. It makes debugging a lot easier. Remember that the braces must be inserted by Word, not just typed. I sometimes put quotation marks around my mergefields in IF fields and calculation fields. That may just be superstitious behavior on my part, though. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "theryno" wrote in message ... I guess I should not have used State Abbrev as an example. If the state is California, I would want to show the division number, otherwise show nothing. Would I then use: { IF {MergeField "State" } = "California" Division_No }? THANK YOU!!! "Charles Kenyon" wrote: That is what the IF field is for. { IF {MergeField "State" } = "California" "CA" } Didn't see the sense of including another mergefield if the only state is California, if you need the mergefield, insert that instead. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. |
#5
![]() |
|||
|
|||
![]()
I *always* put quotes around the field results in IF constructions and
calculations - even where they are not strictly required - because it makes the statements easier to debug. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Charles Kenyon wrote: I would use: { IF {MergeField "State" } = "California" {MergeField Division_No} } I definitely like to make my MergeField and Ref field references explicit. It makes debugging a lot easier. Remember that the braces must be inserted by Word, not just typed. I sometimes put quotation marks around my mergefields in IF fields and calculation fields. That may just be superstitious behavior on my part, though. "theryno" wrote in message ... I guess I should not have used State Abbrev as an example. If the state is California, I would want to show the division number, otherwise show nothing. Would I then use: { IF {MergeField "State" } = "California" Division_No }? THANK YOU!!! "Charles Kenyon" wrote: That is what the IF field is for. { IF {MergeField "State" } = "California" "CA" } Didn't see the sense of including another mergefield if the only state is California, if you need the mergefield, insert that instead. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ASK and FILLIN fields in INCLUDETEXT documents do not merge correc | Mailmerge | |||
Can you create a multi-layered merge where certain merge fields a. | Mailmerge | |||
Merge Fields in Header? | Mailmerge | |||
Merge Fields, Headers, Etc. | Mailmerge | |||
Using MAILMERGE fields within HYPERLINK fields for Merge to Email | Mailmerge |