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  

Mailmerge Switches



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 04:35 PM posted to microsoft.public.word.mailmerge.fields
Debbie[_3_]
external usenet poster
 
Posts: 46
Default Mailmerge Switches

How would I do an IF statement where IF a check box is null then do
nothing but if yes, then enter a field.

This is what I am trying to do - { IF {MERGEFIELD FT Contract} = TRUE
(or "") then insert {MERGEFIELD "Start"} otherwise enter text "N/
A"} " }

This is the formula I am using but can't get it to work.

{ IF "{MERGEFIELD FT Contract}" = TRUE "{MERGEFIELD Start}" {"N/A"}
" }

I am thinking it is something like this but it does not work.
Any help would be greatly appreciated.
Thanks in advance.

Debbie
  #2  
Old April 30th, 2010, 06:02 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Mailmerge Switches

It kinda depends on where your checkbox data is coming from, and how you
are connecting to that data. The simplest thing is probably to insert
your mergefield

{ MERGEFIELD "FT Contract" }

and see what results you get for each of the two possible values in your
datasource (assuming you don't also have a third "unspecified" value).

If it's Access,...the value that Word receives from a
boolean/Yes/No/True/False field in Access depends primarily on the
method you use to connect to Access - AFAIK they are as follows:
Connection method "Yes" "No"
DDE -1 0
ODBC 1 0
OLE DB True False

I think one of the following nested fields will work, but I've lifted
this from one of my earlier messages without checking, so you will need
to check for yourself.

{ IF { =IF({ MERGEFIELD "FT Contract" },1,0) } = 1 "{ MERGEFIELD Start
}""N/A"}
or
{ =IF({ MERGEFIELD "FT Contract" },1,-1) \#"'{ MERGEFIELD Start }';'N/A'" }

Every pair of {} has to be a pair of the special field code braces that
you can enter using ctrl-F9)

Peter Jamieson

http://tips.pjmsn.me.uk

On 30/04/2010 16:35, Debbie wrote:
How would I do an IF statement where IF a check box is null then do
nothing but if yes, then enter a field.

This is what I am trying to do - { IF {MERGEFIELD FT Contract} = TRUE
(or "") then insert {MERGEFIELD "Start"} otherwise enter text "N/
A"} " }

This is the formula I am using but can't get it to work.

{ IF "{MERGEFIELD FT Contract}" = TRUE "{MERGEFIELD Start}" {"N/A"}
" }

I am thinking it is something like this but it does not work.
Any help would be greatly appreciated.
Thanks in advance.

Debbie

 




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 07:04 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.