A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Compound IF in merge field



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2004, 06:24 PM
Jim R
external usenet poster
 
Posts: n/a
Default Compound IF in merge field

I have been merging Excel to Word2K without a problem. Now what I
want to do is the following:

If PropertyVacant = 1 then "Vacant"
elseif PropertyRented = 1 then "Rented"
else
"Owner Occupied"
endif

The fields PropertyVacant and PeopertyRented are on the merged Excel
file. I want to put the literals on the Word document.

I know I can use VBA but I'm not sure exactly how and were to put it
in VBA.

Any help would be appreciated.
  #2  
Old September 15th, 2004, 07:36 PM
Greg
external usenet poster
 
Posts: n/a
Default

Jim,

You can do this with fields in the merge document without
using VBA:

{IF{MergeField PropertyVacant} = "1""Vacant"{IF{MergeField
PropertyRented} = "1""Rented""Owner Occupied"}}


-----Original Message-----
I have been merging Excel to Word2K without a problem.

Now what I
want to do is the following:

If PropertyVacant = 1 then "Vacant"
elseif PropertyRented = 1 then "Rented"
else
"Owner Occupied"
endif

The fields PropertyVacant and PeopertyRented are on the

merged Excel
file. I want to put the literals on the Word document.

I know I can use VBA but I'm not sure exactly how and

were to put it
in VBA.

Any help would be appreciated.
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank Field merge error James T. Using Forms 1 July 22nd, 2004 06:47 PM
Need to calculate on a merge field SandyE Mailmerge 0 May 15th, 2004 10:15 PM
Merge hyperlink field zalbermere Mailmerge 1 May 14th, 2004 06:12 AM


All times are GMT +1. The time now is 05:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.