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 / May 2007

Tip: Looking for answers? Try searching our database.

Punctuating properly when mailmerging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tinkerbelle - 15 May 2007 15:17 GMT
I am currently writing a letter which includes for example, up to 3 different
deductions and rates.  I have made the three mailmerge if formulas to only
bring through the ones that should be deducted but when I read the letter it
doesnt entirely make sense as it has not commas or "and"

At the moment i get

#% Tax #% NI #% Pension

What I would like is;

#% Tax, #% NI and #% Pension
or
#% Tax and #%NI
or
#% Tax and #% Pension
or
#%NI and #% Pension

Please could someone tell me if this is possible??

Thanks for your help - sarah
Doug Robbins - Word MVP - 15 May 2007 16:16 GMT
Yes, it should be possible with the use of If...then...Else field
constructions.  However, if the data source was an Access table, I would be
more inclined to use IF() functions in an Access Query to get the result
rather than do it in the mailmerge main document.

Signature

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

>I am currently writing a letter which includes for example, up to 3
>different
[quoted text clipped - 20 lines]
>
> Thanks for your help - sarah
tinkerbelle - 16 May 2007 12:27 GMT
Hi I am using excel for the data, please could you explain the if..then..else
funstion as it is one i am not familiar with.

Thanks - Sarah

> Yes, it should be possible with the use of If...then...Else field
> constructions.  However, if the data source was an Access table, I would be
[quoted text clipped - 25 lines]
> >
> > Thanks for your help - sarah
Doug Robbins - Word MVP - 16 May 2007 15:08 GMT
{ IF { MERGEFIELD Tax } > 0 { IF { MERGEFIELD Ni } > 0 { IF { MERGEFIELD
Pension } > 0 "{ MERGEFIELD Tax }, { MERGEFIELD Ni } and { MERGEFIELD
Pension }" "{ MERGEFIELD Tax } and { MERGEFIELD Ni }" }{ IF { MERGEFIELD
Pension } > 0 "{ MERGEFIELD Tax } and { MERGEFIELD Pension }" "{ MERGEFIELD
Tax }" }{ IF { MERGEFIELD Ni } > 0 { IF { MERGEFIELD Pension } > 0 "{
MERGEFIELD Ni } and { MERGEFIELD Pension }" "{ MERGEFIELD Ni }"} { IF {
MERGEFIELD Pension } > 0 "{ MERGEFIELD Pension }" "" }}

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

Signature

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

> Hi I am using excel for the data, please could you explain the
> if..then..else
[quoted text clipped - 34 lines]
>> >
>> > Thanks for your help - sarah
tinkerbelle - 17 May 2007 17:17 GMT
Hi Doug, Thanks for you help, however after turning your message below into
the fields in word, I got an error, i think this is because there are
different amounts of Open brackets to closed brackets.

I have tried to make it work but i just get errors.

Any chance you could have a quick look at where the other brackets should be??

Thanks for you time and help - Sarah

> { IF { MERGEFIELD Tax } > 0 { IF { MERGEFIELD Ni } > 0 { IF { MERGEFIELD
> Pension } > 0 "{ MERGEFIELD Tax }, { MERGEFIELD Ni } and { MERGEFIELD
[quoted text clipped - 45 lines]
> >> >
> >> > Thanks for your help - sarah
Doug Robbins - Word MVP - 17 May 2007 19:50 GMT
I believe that there are a couple of missing closing }} at the end  of what
I posted, so that the field construction should look like:

{ IF { MERGEFIELD Tax } > 0 { IF { MERGEFIELD Ni } > 0 { IF { MERGEFIELD
Pension } > 0 "{ MERGEFIELD Tax }, { MERGEFIELD Ni } and { MERGEFIELD
Pension }" "{ MERGEFIELD Tax } and { MERGEFIELD Ni }" }{ IF { MERGEFIELD
Pension } > 0 "{ MERGEFIELD Tax } and { MERGEFIELD Pension }" "{ MERGEFIELD
Tax }" }{ IF { MERGEFIELD Ni } > 0 { IF { MERGEFIELD Pension } > 0 "{
MERGEFIELD Ni } and { MERGEFIELD Pension }" "{ MERGEFIELD Ni }"} { IF {
MERGEFIELD Pension } > 0 "{ MERGEFIELD Pension }" "" }}}}

However, if you used Ctrl+F9 to insert the field delimiters, they will be
balanced as each time you use Ctrl+F9, a pair of field delimiters is
inserted.

Another thing however is that it is necessary to have a space either side of
each > operator.

Signature

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

> Hi Doug, Thanks for you help, however after turning your message below
> into
[quoted text clipped - 62 lines]
>> >> >
>> >> > Thanks for your help - sarah
 
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.