If...then..else - insert tab?

P

Patti

I am inserting a word field into my merge. It is an if..then..else field. If a certain field equals yes then tab. How do I write this? What is the designation for a tab? I tried ^t but that did not work.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?UGF0dGk=?=,
I am inserting a word field into my merge. It is an if..then..else field.
If a certain field equals yes then tab. How do I write this? What is the
designation for a tab? I tried ^t but that did not work.It would basically look like this:

{ IF { Mergefield xyz } = "yes" " " "" }

Where you actually press the TAB key where you want to have it.

If you're currently working in Word's If...then...else dialog box, type
anything you want where you need the TAB. Close the dialog box. Now press
Alt+F9 and you should see the field codes (as above). Select what the
placeholder, delete it, and press TAB. Alt+F9 again to hide the field codes.

Note: do NOT try to type the field code above from the keyboard. You can't use
{ } from the keyboard to insert field brackets. This can only be done by
pressing Ctrl+F9. These are actually special control characters that just look
like { }.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

Peter Jamieson

You put an actual tab character into the result text.

But it is probably easier to do this if you insert the IF field first
(however you are currently doing that) then use Alt-F9 to reveal the field
codes in your text and edit the result texts directly.

e.g. if you already have something like
{ IF { MERGEFIELD x } = "yes" "" "" }

then put the insertion point between the first "" and press the tab key
(unless the field is in a table, in which case use ctrl-tab).

As for checking for "yes", if it is literally "yes" then the above would be
OK. But if it could be Yes, yes or YES then you need something like


{ IF { MERGEFIELD x \*Upper } = "YES" "<a tab character>" "" }

Perhaps not relevant, but...

and if x is a Yesno field in Access you will probably need something more
like

{ IF { MERGEFIELD x } = 0 "" "<a tab character>" }

but you need to check exactly what values Word inserts for { MERGEFIELD x }
for the "True/False" values of x and test against that value in your IF
statement (because Word inserts different values for True/False, Yes/No
depending on how it connects to Access).
--
Peter Jamieson - Word MVP

Patti said:
I am inserting a word field into my merge. It is an if..then..else field.
If a certain field equals yes then tab. How do I write this? What is the
designation for a tab? I tried ^t but that did not work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top