Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2005

Tip: Looking for answers? Try searching our database.

if then type question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Glenn - 20 Aug 2005 12:37 GMT
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
Graham Mayor - 20 Aug 2005 13:30 GMT
{IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"}

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I am creating a membership directory.
>
[quoted text clipped - 17 lines]
> Thanks,
> Glenn
Glenn - 20 Aug 2005 13:39 GMT
Thanks, but where do I put that?  When I copy and paste it from here it just
shows up as text.
> {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"}
>
[quoted text clipped - 19 lines]
>> Thanks,
>> Glenn
Doug Robbins - 20 Aug 2005 16:50 GMT
You must use Ctrl+F9 to insert the field delimiters { }.  You cannot insert
them using those keys on the keyboard.

Signature

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

> Thanks, but where do I put that?  When I copy and paste it from here it
> just shows up as text.
[quoted text clipped - 21 lines]
>>> Thanks,
>>> Glenn
Glenn - 20 Aug 2005 18:33 GMT
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
whata@member.com
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

> You must use Ctrl+F9 to insert the field delimiters { }.  You cannot insert
> them using those keys on the keyboard.
[quoted text clipped - 24 lines]
> >>> Thanks,
> >>> Glenn
Graham Mayor - 21 Aug 2005 06:17 GMT
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}"}

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> That worked great, thank you!
>
[quoted text clipped - 62 lines]
>>>>> Thanks,
>>>>> Glenn
Doug Robbins - 20 Aug 2005 20:54 GMT
{IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield
NextMergefield }}

Signature

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

> {IF {Mergefield PublishEmail} = "Yes" "{Mergefield Email}"}
>
[quoted text clipped - 19 lines]
>> Thanks,
>> Glenn
Glenn - 20 Aug 2005 21:52 GMT
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.

> {IF {Mergefield PublishEmail} = "Yes" {Mergefield Email} {Mergefield
> NextMergefield }}
[quoted text clipped - 22 lines]
> >> Thanks,
> >> Glenn
Graham Mayor - 21 Aug 2005 06:18 GMT
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_labels_with_word_xp.htm  and
http://www.gmayor.com/formatting_word_fields.htm useful.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> 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
[quoted text clipped - 47 lines]
>>>> Thanks,
>>>> Glenn
Glenn - 21 Aug 2005 14:21 GMT
What I am trying to do is prevent a blank line from showing up if the e-mail
isn't to be listed.

> NextMergefield is a pseudonym for the next field you wish to use from your
> data file. Replace it with that field name!
[quoted text clipped - 55 lines]
>>>>> Thanks,
>>>>> Glenn
Graham Mayor - 21 Aug 2005 14:49 GMT
See my other answer in this thread.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> What I am trying to do is prevent a blank line from showing up if the
> e-mail isn't to be listed.
[quoted text clipped - 65 lines]
>>>>>> Thanks,
>>>>>> Glenn
Doug Robbins - 21 Aug 2005 15:16 GMT
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.
Signature

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

> What I am trying to do is prevent a blank line from showing up if the
> e-mail isn't to be listed.
[quoted text clipped - 58 lines]
>>>>>> Thanks,
>>>>>> Glenn

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.