A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF Statement



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2008, 09:29 PM posted to microsoft.public.word.mailmerge.fields
John B
external usenet poster
 
Posts: 46
Default IF Statement

I would like to know how to go about putting in IF statement into a mail
merge? I have 2 fields, one is called Firstname and the other is called
Client. I would like to have Firstname pulled, and IF blank, then pull
Client. Any help on this would be greatly appreciated. Thanks.

John
  #2  
Old April 22nd, 2008, 02:45 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default IF Statement

The field construction that you will need is:

{ IF { MERGEFIELD Firstname } "" { MERGEFIELD Firstname } { MERGEFIELD
Client } }

Each pair of field delimiters { } must be inserted using Ctrl+F9 and you use
Alt+F9 to toggle off the display of the field codes. You will need a space
either side of the .

--
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 B" wrote in message
...
I would like to know how to go about putting in IF statement into a mail
merge? I have 2 fields, one is called Firstname and the other is called
Client. I would like to have Firstname pulled, and IF blank, then pull
Client. Any help on this would be greatly appreciated. Thanks.

John



  #3  
Old April 22nd, 2008, 09:49 PM posted to microsoft.public.word.mailmerge.fields
John B
external usenet poster
 
Posts: 46
Default IF Statement

Doug,

Thanks. I remember doing something similiar to this a few years ago, but
couldn't remember how to do it. I have an addition to this though. I have
another field to add to this. As before, I would like to have Firstname
pulled, and IF blank, then pull Client, and IF Client blank, then pull
Businessname. Hope you can help with this again. Thanks.

John


"Doug Robbins - Word MVP" wrote:

The field construction that you will need is:

{ IF { MERGEFIELD Firstname } "" { MERGEFIELD Firstname } { MERGEFIELD
Client } }

Each pair of field delimiters { } must be inserted using Ctrl+F9 and you use
Alt+F9 to toggle off the display of the field codes. You will need a space
either side of the .

--
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 B" wrote in message
...
I would like to know how to go about putting in IF statement into a mail
merge? I have 2 fields, one is called Firstname and the other is called
Client. I would like to have Firstname pulled, and IF blank, then pull
Client. Any help on this would be greatly appreciated. Thanks.

John




  #4  
Old April 22nd, 2008, 10:47 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default IF Statement

Just include another If...then...Else field construction

{ IF { MERGEFIELD Firstname } "" { MERGEFIELD Firstname } { IF{
MERGEFIELD
Client } "" { MERGEFIELD Client } { MERGEFIELD Businessname } } }


--
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 B" wrote in message
...
Doug,

Thanks. I remember doing something similiar to this a few years ago, but
couldn't remember how to do it. I have an addition to this though. I have
another field to add to this. As before, I would like to have Firstname
pulled, and IF blank, then pull Client, and IF Client blank, then pull
Businessname. Hope you can help with this again. Thanks.

John


"Doug Robbins - Word MVP" wrote:

The field construction that you will need is:

{ IF { MERGEFIELD Firstname } "" { MERGEFIELD Firstname } { MERGEFIELD
Client } }

Each pair of field delimiters { } must be inserted using Ctrl+F9 and you
use
Alt+F9 to toggle off the display of the field codes. You will need a
space
either side of the .

--
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 B" wrote in message
...
I would like to know how to go about putting in IF statement into a mail
merge? I have 2 fields, one is called Firstname and the other is called
Client. I would like to have Firstname pulled, and IF blank, then pull
Client. Any help on this would be greatly appreciated. Thanks.

John






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.