#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
swimdad16 swimdad16 is offline
external usenet poster
 
Posts: 3
Default IF THEN ELSE

Is there a way to insert a field, NOT text but an actual merge field, using
the if-then-else clause?

I have am excel file that I'm merging from that contains fields for first
name (FIRST) and preferred first name (PREF)

If PREF is blank I want to insert FIRST
ELSE (Pref has a value) I want to insert PREF.

Can this be done?


  #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 IF THEN ELSE

{ IF { MERGEFIELD PREF } = "" { MERGEFIELD FIRST } { MERGEFIELD PREF } }

You must use Ctrl+F9 for each pair of field delimiters { } and you use
Alt+F9 to toggle off their display.

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

"swimdad16" wrote in message
...
Is there a way to insert a field, NOT text but an actual merge field,
using the if-then-else clause?

I have am excel file that I'm merging from that contains fields for first
name (FIRST) and preferred first name (PREF)

If PREF is blank I want to insert FIRST
ELSE (Pref has a value) I want to insert PREF.

Can this be done?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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