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 / March 2005

Tip: Looking for answers? Try searching our database.

Need help with conditional if statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jan - 23 Mar 2005 18:17 GMT
I need help with a conditional if statement and can not write the syntax
correctly.  Can some help?  Need as follows (I am using Word 2003).

if MF item A="" and MF product A = "" then place a paragraph mark, if item
A="",  MF product A, if MF product A="", MF item A, MF item A  and MF product
A.

Examples base on conditions may look like:

Product A
Item A
Item A  Product A

If my example is not clear,please let me know.
TIA
Peter Jamieson - 24 Mar 2005 22:14 GMT
> If my example is not clear,please let me know.

It isn't completely clear, but I suspect what you need is something like:

{ MERGEFIELD itemA }{ IF "{ MERGEFIELD itemA }" = ""
"{ IF "{ MERGEFIELD productA }" = "" "
" "" }" " " }{ MERGEFIELD productA }

However, since you may run into trouble if both items are blank (because of
the way Word's line removal works, you may need the whole thing, e.g.

{ IF "{ MERGEFIELD itemA }" = ""
"{ IF "{ MERGEFIELD productA }" = "" "
" "{ MERGEFIELD productA }" }"
"{ MERGEFIELD itemA }{ IF "{ MERGEFIELD productA }" = ""
""
" { MERGEFIELD productA }" }" }"

where there is an ordinary paragraph mark at the end of the second line at
least.

Peter Jamieson

>I need help with a conditional if statement and can not write the syntax
> correctly.  Can some help?  Need as follows (I am using Word 2003).
[quoted text clipped - 12 lines]
> If my example is not clear,please let me know.
> TIA
 
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.