Home |
Search |
Today's Posts |
#1
|
|||
|
|||
if then type question
I am creating a membership directory.
All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#2
|
|||
|
|||
{IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"}
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#3
|
|||
|
|||
Thanks, but where do I put that? When I copy and paste it from here it just
shows up as text. "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#4
|
|||
|
|||
You must use Ctrl+F9 to insert the field delimiters { }. You cannot insert
them using those keys on the keyboard. -- 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 "Glenn" wrote in message ... Thanks, but where do I put that? When I copy and paste it from here it just shows up as text. "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#6
|
|||
|
|||
{IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield
NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#7
|
|||
|
|||
When I try that I get the "Invalid Merge Field" popup box. It says this
mergefield (NextMergefield) is used in the main document, but it does not exist in the data source. Also, once I click the button to view the data, I can't figure out how to get back to a place where I can edit the place where I put the merge fields in using CTRL F9 and typing the info in. I've tried view all but that doesn't seem to work. "Doug Robbins" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#8
|
|||
|
|||
You need to insert the line break into the result of the conditional field
eg {Mergefield Name}{IF {Mergefield PublishEmail} "" " {Mergefield Email}"}{IF Mergefield PublishPhone} "" " {Mergefield Phone}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: That worked great, thank you! Next question - if the field is "No" so that the e-mail address isn't published, how do I get to avoid entering a blank line? For instance when I do the merge using the commands you taught me about, I get: Whata Member 555-1213 John Doe 555-1212 where as since John chose not to have his e-mail published, I'd like him to show up as: John Doe 555-1212 "Doug Robbins" wrote in message ... You must use Ctrl+F9 to insert the field delimiters { }. You cannot insert them using those keys on the keyboard. -- 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 "Glenn" wrote in message ... Thanks, but where do I put that? When I copy and paste it from here it just shows up as text. "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#9
|
|||
|
|||
NextMergefield is a pseudonym for the next field you wish to use from your
data file. Replace it with that field name! Use ALT+F9 to toggle between the field display and the results. You may find http://www.gmayor.com/mail_merge_lab...th_word_xp.htm and http://www.gmayor.com/formatting_word_fields.htm useful. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: When I try that I get the "Invalid Merge Field" popup box. It says this mergefield (NextMergefield) is used in the main document, but it does not exist in the data source. Also, once I click the button to view the data, I can't figure out how to get back to a place where I can edit the place where I put the merge fields in using CTRL F9 and typing the info in. I've tried view all but that doesn't seem to work. "Doug Robbins" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#10
|
|||
|
|||
What I am trying to do is prevent a blank line from showing up if the e-mail
isn't to be listed. "Graham Mayor" wrote in message ... NextMergefield is a pseudonym for the next field you wish to use from your data file. Replace it with that field name! Use ALT+F9 to toggle between the field display and the results. You may find http://www.gmayor.com/mail_merge_lab...th_word_xp.htm and http://www.gmayor.com/formatting_word_fields.htm useful. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: When I try that I get the "Invalid Merge Field" popup box. It says this mergefield (NextMergefield) is used in the main document, but it does not exist in the data source. Also, once I click the button to view the data, I can't figure out how to get back to a place where I can edit the place where I put the merge fields in using CTRL F9 and typing the info in. I've tried view all but that doesn't seem to work. "Doug Robbins" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#11
|
|||
|
|||
See my other answer in this thread.
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: What I am trying to do is prevent a blank line from showing up if the e-mail isn't to be listed. "Graham Mayor" wrote in message ... NextMergefield is a pseudonym for the next field you wish to use from your data file. Replace it with that field name! Use ALT+F9 to toggle between the field display and the results. You may find http://www.gmayor.com/mail_merge_lab...th_word_xp.htm and http://www.gmayor.com/formatting_word_fields.htm useful. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: When I try that I get the "Invalid Merge Field" popup box. It says this mergefield (NextMergefield) is used in the main document, but it does not exist in the data source. Also, once I click the button to view the data, I can't figure out how to get back to a place where I can edit the place where I put the merge fields in using CTRL F9 and typing the info in. I've tried view all but that doesn't seem to work. "Doug Robbins" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
#12
|
|||
|
|||
On line 1:
{IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} { IF {Mergefield PublishPhone} = "Yes" { Mergefield Phone}}""} On line 2: {IF {Mergefield PublishEmail} = "Yes" { IF{Mergefield PublishPhone} = "Yes" { Mergefield Phone} "" }}} Line 1 checks to see if the email is to be published. If it is, it inserts the email address. If it isn't, it checks if the phone is to be pubished. If it is, it inserts the phone number. If neither are to be published, neither is inserted. Line 2 checks ot see if the email was published (in which case the phone would not have been published by line 1), then it checks to see if the phone is to be published and if it is, it inserts the phone number. If the phone is not to be published, nothing is inserted. -- 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 "Glenn" wrote in message ... What I am trying to do is prevent a blank line from showing up if the e-mail isn't to be listed. "Graham Mayor" wrote in message ... NextMergefield is a pseudonym for the next field you wish to use from your data file. Replace it with that field name! Use ALT+F9 to toggle between the field display and the results. You may find http://www.gmayor.com/mail_merge_lab...th_word_xp.htm and http://www.gmayor.com/formatting_word_fields.htm useful. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: When I try that I get the "Invalid Merge Field" popup box. It says this mergefield (NextMergefield) is used in the main document, but it does not exist in the data source. Also, once I click the button to view the data, I can't figure out how to get back to a place where I can edit the place where I put the merge fields in using CTRL F9 and typing the info in. I've tried view all but that doesn't seem to work. "Doug Robbins" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield NextMergefield }} -- 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 "Graham Mayor" wrote in message ... {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Glenn wrote: I am creating a membership directory. All members will have their name and address published. However, they have been given the option to have their email and/or phone number published. My database contains the following pieces of information: Name Address PublishEmail Phone PublishPhone The PublishEmail and PublishPhone fields contain either "Yes" or "No". How can I set my document up so that if PublishEmail = Yes then it will print the Email address from the Email field? Thanks, Glenn |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i prevent eating words as i type? | Microsoft Word Help | |||
How do I type over the lines in forms without the line expanding? | Microsoft Word Help | |||
Word should let me type text in a specific color | Microsoft Word Help | |||
Can't fit a standard A$ label type on one page of A4 | Page Layout | |||
Type a control # in word and have it show up in footer... | Microsoft Word Help |