Reply
 
Thread Tools Display Modes
  #1   Report Post  
Glenn
 
Posts: n/a
Default 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
Email
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   Report Post  
Graham Mayor
 
Posts: n/a
Default

{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
Email
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   Report Post  
Glenn
 
Posts: n/a
Default

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
Email
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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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







  #5   Report Post  
Glenn
 
Posts: n/a
Default

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
Email
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   Report Post  
Doug Robbins
 
Posts: n/a
Default

{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
Email
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   Report Post  
Glenn
 
Posts: n/a
Default

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
Email
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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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
Email
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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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
Email
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   Report Post  
Glenn
 
Posts: n/a
Default

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
Email
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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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
Email
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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i prevent eating words as i type? do-dads Microsoft Word Help 5 May 18th 23 02:51 AM
How do I type over the lines in forms without the line expanding? W. D. McNaull Microsoft Word Help 1 July 27th 05 07:25 AM
Word should let me type text in a specific color Gordon_Hogenson Microsoft Word Help 2 July 16th 05 06:06 PM
Can't fit a standard A$ label type on one page of A4 Robert M Jones Page Layout 2 June 23rd 05 07:00 PM
Type a control # in word and have it show up in footer... SuzyVA Microsoft Word Help 1 April 13th 05 11:19 PM


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