WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Creating an If...Then...Else rule for mail merges

 
   Home -> Office -> MailMerge Fields RSS
Next:  How do I maintain a field length in merged docume..  
Author Message
John Salerno

External


Since: Jun 17, 2008
Posts: 20



(Msg. 1) Posted: Wed Aug 27, 2008 10:53 am
Post subject: Creating an If...Then...Else rule for mail merges
Archived from groups: microsoft>public>word>mailmerge>fields (more info?)

Hi everyone. If I have a "Nickname" column in my data table and want to
create a rule such as this:

If <Nickname> is not blank, then use <Nickname>, else use <First Name>.

The reverse of that rule would also work. (If it's blank, use First Name,
else use Nickname.)

But how do I do this? Looking at the options for the If rules, I don't see a
way to do something this specific. It only seems you can check a data entry
and then substitute actual text, not another field value.

Thanks!
Back to top
Login to vote
Rich/rerat

External


Since: Oct 15, 2006
Posts: 274



(Msg. 2) Posted: Wed Aug 27, 2008 1:20 pm
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

John Salerno,

Try the following IF function in your Word Document, once you link your data
source to the Mail Merge document.



{if {Mergefield First_Name}<> "" "{Mergefield First_Name}" "{Mergefield
NickName}" }



You can not just type this, you will need to insert the fields into the
formula. A simple way of doing it is as follows.

1. Insert Word Field button> Choose If....Then

2. Select if first name Is Not Blank. Which will give you this in your Word
Document.

{if {Mergefield first_name}<> "" "" "" }

3. Click mouse in the center of the Second double quotes (""). From the Mail
Merge toolbar> Select Insert Mail Mergefields button, and choose "First
Name"> Apply/OK.

4. Click mouse in the center of the Third double quotes (""). From the Mail
Merge toolbar> Select Insert Mail Mergefields button, and choose "NickName">
Apply/OK.




--
Add MS to your News Reader: news://msnews.microsoft.com
Rich/rerat (RRR News) <message rule>
<<Previous Text Snipped to Save Bandwidth When Appropriate>>



"John Salerno" <johnjsal.DeleteThis@NOSPAMgmail.com> wrote in message
news:48b56aae$0$17360$c3e8da3@news.astraweb.com...
Hi everyone. If I have a "Nickname" column in my data table and want to
create a rule such as this:

If <Nickname> is not blank, then use <Nickname>, else use <First Name>.

The reverse of that rule would also work. (If it's blank, use First Name,
else use Nickname.)

But how do I do this? Looking at the options for the If rules, I don't see a
way to do something this specific. It only seems you can check a data entry
and then substitute actual text, not another field value.

Thanks!
Back to top
Login to vote
macropod

External


Since: Jul 02, 2008
Posts: 594



(Msg. 3) Posted: Thu Aug 28, 2008 3:06 am
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Mia,

Heres how you can vary the output:
1. Make a duplicate of the nickname mailmerge field, and arrange those fields and the firstname field so that you get something
like:
«Nickname» «FirstName» «Nickname»
2. Press Ctrl-F9, to wrap a field around these, so that you get:
{ «Nickname» «FirstName» «Nickname» }
3. Fill in between the braces, paying careful attention to the spacing, so that you end up with:
{IF«Nickname»= "" «FirstName» «Nickname»}
4. Run your mailmerge.

That should give the result you're after.


--
Cheers
macropod
[MVP - Microsoft Word]


"John Salerno" <johnjsal RemoveThis @NOSPAMgmail.com> wrote in message news:48b56aae$0$17360$c3e8da3@news.astraweb.com...
> Hi everyone. If I have a "Nickname" column in my data table and want to create a rule such as this:
>
> If <Nickname> is not blank, then use <Nickname>, else use <First Name>.
>
> The reverse of that rule would also work. (If it's blank, use First Name, else use Nickname.)
>
> But how do I do this? Looking at the options for the If rules, I don't see a way to do something this specific. It only seems you
> can check a data entry and then substitute actual text, not another field value.
>
> Thanks!
>
Back to top
Login to vote
Graham Mayor

External


Since: Jul 04, 2006
Posts: 10944



(Msg. 4) Posted: Thu Aug 28, 2008 9:28 am
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I think you have that the wrong way round?
{IF {Mergefield NickName}<> "" "{Mergefield NickName}" "{Mergefield
First_Name}" }

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

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


Rich/rerat wrote:
> John Salerno,
>
> Try the following IF function in your Word Document, once you link
> your data source to the Mail Merge document.
>
>
>
> {if {Mergefield First_Name}<> "" "{Mergefield First_Name}"
> "{Mergefield NickName}" }
>
>
>
> You can not just type this, you will need to insert the fields into
> the formula. A simple way of doing it is as follows.
>
> 1. Insert Word Field button> Choose If....Then
>
> 2. Select if first name Is Not Blank. Which will give you this in
> your Word Document.
>
> {if {Mergefield first_name}<> "" "" "" }
>
> 3. Click mouse in the center of the Second double quotes (""). From
> the Mail Merge toolbar> Select Insert Mail Mergefields button, and
> choose "First Name"> Apply/OK.
>
> 4. Click mouse in the center of the Third double quotes (""). From
> the Mail Merge toolbar> Select Insert Mail Mergefields button, and
> choose "NickName"> Apply/OK.
Back to top
Login to vote
John Salerno

External


Since: Jun 17, 2008
Posts: 20



(Msg. 5) Posted: Thu Aug 28, 2008 11:34 am
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"macropod" <macropod DeleteThis @invalid.invalid> wrote in message
news:OONr$jGCJHA.2292@TK2MSFTNGP02.phx.gbl...

> Heres how you can vary the output:
> 1. Make a duplicate of the nickname mailmerge field, and arrange those
> fields and the firstname field so that you get something like:
> «Nickname» «FirstName» «Nickname»
> 2. Press Ctrl-F9, to wrap a field around these, so that you get:
> { «Nickname» «FirstName» «Nickname» }
> 3. Fill in between the braces, paying careful attention to the spacing, so
> that you end up with:
> {IF«Nickname»= "" «FirstName» «Nickname»}
> 4. Run your mailmerge.
>
> That should give the result you're after.

Thanks! That works great! Too bad it's rather messy (as opposed to having
this process built-in).

Now, is there some way to save this functionality so that I don't have to
re-create this each time?
Back to top
Login to vote
Doug Robbins - Word MVP

External


Since: Jul 14, 2006
Posts: 5475



(Msg. 6) Posted: Fri Aug 29, 2008 3:06 am
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Use Copy and Paste or create an autotext entry of the field construction.
(Actually, that is not complicated; You should see some of the other ones
that macropod comes up with.)

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

"John Salerno" <johnjsal DeleteThis @NOSPAMgmail.com> wrote in message
news:48b6c5b6$0$2113$c3e8da3@news.astraweb.com...
> "macropod" <macropod DeleteThis @invalid.invalid> wrote in message
> news:OONr$jGCJHA.2292@TK2MSFTNGP02.phx.gbl...
>
>> Heres how you can vary the output:
>> 1. Make a duplicate of the nickname mailmerge field, and arrange those
>> fields and the firstname field so that you get something like:
>> «Nickname» «FirstName» «Nickname»
>> 2. Press Ctrl-F9, to wrap a field around these, so that you get:
>> { «Nickname» «FirstName» «Nickname» }
>> 3. Fill in between the braces, paying careful attention to the spacing,
>> so that you end up with:
>> {IF«Nickname»= "" «FirstName» «Nickname»}
>> 4. Run your mailmerge.
>>
>> That should give the result you're after.
>
> Thanks! That works great! Too bad it's rather messy (as opposed to having
> this process built-in).
>
> Now, is there some way to save this functionality so that I don't have to
> re-create this each time?
>
Back to top
Login to vote
John Salerno

External


Since: Jun 17, 2008
Posts: 20



(Msg. 7) Posted: Fri Aug 29, 2008 3:06 am
Post subject: Re: Creating an If...Then...Else rule for mail merges [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Doug Robbins - Word MVP" <dkr.DeleteThis@REMOVECAPSmvps.org> wrote in message
news:OK6CXiUCJHA.5656@TK2MSFTNGP04.phx.gbl...
> Use Copy and Paste or create an autotext entry of the field construction.
> (Actually, that is not complicated; You should see some of the other ones
> that macropod comes up with.)

Wow, never used AutoText before but it works great! Thanks!
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> MailMerge Fields All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET