Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Hide text that I type when the following mail merge field is empty

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
Word MVP web site http://word.mvps.org



Netti wrote:
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?



  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Netti Netti is offline
external usenet poster
 
Posts: 7
Default Hide text that I type when the following mail merge field is e

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?



"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



Netti wrote:
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?




  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Netti Netti is offline
external usenet poster
 
Posts: 7
Default Hide text that I type when the following mail merge field is e

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

"Netti" wrote:

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?



"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



Netti wrote:
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?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Hide text that I type when the following mail merge field is e

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?sourc...ock+on+startup

--

Graham Mayor - Word MVP

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



Netti wrote:
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?



"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



Netti wrote:
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?



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
How do I avoid a blank line if a mail merge field is empty? Geo 4 Mailmerge 3 April 3rd 12 01:28 PM
Delete text precending an empty/zeroed merge field? cpeiner Mailmerge 4 November 27th 07 03:39 PM
In Word 2003 when mail merge how do I delete an empty field? connie Mailmerge 3 July 23rd 07 05:25 PM
How do I omit an empty date merge field? Phildeman Microsoft Word Help 5 June 13th 05 03:29 PM
Mail merge field isn't displaying all the text in a field. Can I . mojohubbard Mailmerge 3 March 28th 05 04:45 PM


All times are GMT +1. The time now is 04:13 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"