Hide text that I type when the following mail merge field is empty

N

Netti

I am using the mail merge feature to create a directory where I type titles
that introduces the information that is included in the mail merge fields
(e.g., I've typed "Phone:" <Mail merge field for phone>, then "Email:" <Mail
merge field for email>, etc.). Is it possible to create some type of macro
or instruction to hide the selected text "Phone:" when the following Mail
merge field is empty?
 
G

Graham Mayor

You can do this with conditional fields eg

{Mergefield Thepreviousfield}{IF {Mergefield phone} <> "" "¶
Phone: {Mergefield phone}"}{IF {Mergefield email} <> "" "¶
Email: {Mergefield email}"}

The field brackets {} are inserted with CTRL+F9. The fieldnames are those
from your data. Press enter ONLY where you see ¶ and watch the quotes are
correctly placed.
The line break, text and field are only inserted when the fields contain
data.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
N

Netti

I was trying this out and before I really had a chance to play around and
figure out exactly how it should look in my document the field brackets
stopped working. Now for some reason when I press CTRL and F9 nothing
happens, did I somehow press something that changed the function of the keys?
 
N

Netti

I just tried it by going to "insert" and then "field" and it worked. Thanks
for the help.
 
G

Graham Mayor

Many keyboards - mine included - have an F Lock button which allows
switching between F key function sets. You can set the default F lock to use
the standard F Key commands rather than the alternative command set with a
registry patch. The actual patch depends on the keyboard - see
http://www.google.co.uk/search?sour...&rlz=1T4GGLJ_enCY264CY264&q=f+lock+on+startup

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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