Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Alvin Mast Alvin Mast is offline
external usenet poster
 
Posts: 4
Default Not merging one field if another is blank

I'm doing a merge using an Access contact file. The user is allowed up to 7
telephone numbers, each with 3 fields: FieldName, AreaCode, Number.

I want to not merge any of the 3 fields if Number is blank. I tried
inserting an IF statement but it's not working.

How can I do this?
--
al
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Not merging one field if another is blank

It would help point out why it is not working if you had posted the field
construction that you had tried and also what "it's not working." means in
terms of the result that you do get.

To start with, the field delimiters { } must be entered using Ctrl+F9. They
cannot be entered using the keys in the row above the Enter Key (on a US
Keyboard)

{ IF { MERGEFIELD Number } "" "{ MERGEFIELD FieldName} { MERGEFIELD
AreaCode } { MERGEFIELD Number}" "" }



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

"Alvin Mast" wrote in message
...
I'm doing a merge using an Access contact file. The user is allowed up to
7
telephone numbers, each with 3 fields: FieldName, AreaCode, Number.

I want to not merge any of the 3 fields if Number is blank. I tried
inserting an IF statement but it's not working.

How can I do this?
--
al



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Alvin Mast Alvin Mast is offline
external usenet poster
 
Posts: 4
Default Not merging one field if another is blank

Doug, thanks a big bunch for the solution. The only difference between you
"IF" and mine was that I did not have quotes around the 3 fields after the .

{IF ( MERGEFIELD "Private" } " " "{ MERGEFIELD "PrivField' } { MERGEFIELD
"PrivAreaCode } { MERGEFIELD "Private" }"}

I apologize for being so vague. By "not working" I meant that the
PrivAreaCode was still printing. I tried to copy and paste the instruction,
but the MERGEFIELDs were replace by values.

al


"Doug Robbins - Word MVP" wrote:

It would help point out why it is not working if you had posted the field
construction that you had tried and also what "it's not working." means in
terms of the result that you do get.

To start with, the field delimiters { } must be entered using Ctrl+F9. They
cannot be entered using the keys in the row above the Enter Key (on a US
Keyboard)

{ IF { MERGEFIELD Number } "" "{ MERGEFIELD FieldName} { MERGEFIELD
AreaCode } { MERGEFIELD Number}" "" }



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

"Alvin Mast" wrote in message
...
I'm doing a merge using an Access contact file. The user is allowed up to
7
telephone numbers, each with 3 fields: FieldName, AreaCode, Number.

I want to not merge any of the 3 fields if Number is blank. I tried
inserting an IF statement but it's not working.

How can I do this?
--
al




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Not merging one field if another is blank

You can get a macro to post field constructions on the web from
http://www.gmayor.com/export_field.htm

--

Graham Mayor - Word MVP

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


Alvin Mast wrote:
Doug, thanks a big bunch for the solution. The only difference
between you "IF" and mine was that I did not have quotes around the 3
fields after the .

{IF ( MERGEFIELD "Private" } " " "{ MERGEFIELD "PrivField' } {
MERGEFIELD "PrivAreaCode } { MERGEFIELD "Private" }"}

I apologize for being so vague. By "not working" I meant that the
PrivAreaCode was still printing. I tried to copy and paste the
instruction, but the MERGEFIELDs were replace by values.

al


"Doug Robbins - Word MVP" wrote:

It would help point out why it is not working if you had posted the
field construction that you had tried and also what "it's not
working." means in terms of the result that you do get.

To start with, the field delimiters { } must be entered using
Ctrl+F9. They cannot be entered using the keys in the row above the
Enter Key (on a US Keyboard)

{ IF { MERGEFIELD Number } "" "{ MERGEFIELD FieldName} {
MERGEFIELD AreaCode } { MERGEFIELD Number}" "" }



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

"Alvin Mast" wrote in message
...
I'm doing a merge using an Access contact file. The user is allowed
up to 7
telephone numbers, each with 3 fields: FieldName, AreaCode, Number.

I want to not merge any of the 3 fields if Number is blank. I tried
inserting an IF statement but it's not working.

How can I do this?
--
al



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
leave a blank line when merging stlof Mailmerge 3 September 29th 06 06:04 PM
merging blank cells from excel to word i want them to stay blank n stlof Mailmerge 1 September 28th 06 06:08 PM
automatically inserting text in a merge field blank field. DrTominRI Mailmerge 2 December 20th 05 06:35 AM
Supress the blank space from a blank data field? John Mailmerge 3 September 20th 05 04:31 PM
Blank fields when mail merging Romina Mailmerge 1 December 13th 04 08:28 AM


All times are GMT +1. The time now is 01:47 PM.

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"