Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2007

Tip: Looking for answers? Try searching our database.

make a merge field go to next merge field if prior one is blank?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
M. Funn - 25 Oct 2007 14:42 GMT
I have a word document that I am merging with an excel spreadsheet.  In the
word document there are three choices for the recipient i woudl like the
merge to go to the next choice if the first one is blank and so on.  I have
tried to use the "If then else" field but I am a beginner and have not had
luck with this.
Peter Jamieson - 25 Oct 2007 16:01 GMT
Assuming that what you mean is that your Spreadsheet has 3 columns, and in
each row, one, two or perhaps even all three of those columns could be blank
/and/ it is OK simply to start checking with the first column and move to
the next as you say, what you need is something like

{ IF "{ MERGEFIELD column1 }" <> "" "{ MERGEFIELD column1 }"
"{ IF "{ MERGEFIELD column2 }" <> "" "{ MERGEFIELD column2 }"
"{ IF "{ MERGEFIELD column3 }" <> "" "{ MERGEFIELD column3 }"
"some other value if all three are blank?" }" }" }

This can all be on one line, but all the {} need to be the special field
braces that you can insert using ctrl-F9 - you can't just type them on the
keyboard. Everything else is plain text. I include the spaces and quotes
partly because that's the way Word usually does it, and partly as a
defensive programming strategy, but many people would drop quite a few of
them.

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

>I have a word document that I am merging with an excel spreadsheet.  In the
> word document there are three choices for the recipient i woudl like the
> merge to go to the next choice if the first one is blank and so on.  I
> have
> tried to use the "If then else" field but I am a beginner and have not had
> luck with this.
M. Funn - 25 Oct 2007 19:05 GMT
Thank you I will try this.

> Assuming that what you mean is that your Spreadsheet has 3 columns, and in
> each row, one, two or perhaps even all three of those columns could be blank
[quoted text clipped - 19 lines]
> > tried to use the "If then else" field but I am a beginner and have not had
> > luck with this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.