Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Punctuating properly when mailmerging

Geek News

Punctuating properly when mailmerging
tinkerbelle 5/15/2007 2:17:02 PM
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
Re: Punctuating properly when mailmerging
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 5/15/2007 3:16:38 PM
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.

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

"tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
news:5FE3697F-C0B7-4ED4-A8A8-6A1619037D95[ at ]microsoft.com...
[Quoted Text]
>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


Re: Punctuating properly when mailmerging
tinkerbelle 5/16/2007 11:27:01 AM
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

"Doug Robbins - Word MVP" wrote:

[Quoted Text]
> 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.
>
> --
> 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
>
> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
> news:5FE3697F-C0B7-4ED4-A8A8-6A1619037D95[ at ]microsoft.com...
> >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
>
>
>
Re: Punctuating properly when mailmerging
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 5/16/2007 2:08:39 PM
{ 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.

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

"tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
news:D04B7133-BF76-4BC4-86BC-BA894863B812[ at ]microsoft.com...
[Quoted Text]
> 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
>
> "Doug Robbins - Word MVP" wrote:
>
>> 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.
>>
>> --
>> 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
>>
>> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
>> news:5FE3697F-C0B7-4ED4-A8A8-6A1619037D95[ at ]microsoft.com...
>> >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
>>
>>
>>


Re: Punctuating properly when mailmerging
tinkerbelle 5/17/2007 4:17:02 PM
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

"Doug Robbins - Word MVP" wrote:

[Quoted Text]
> { 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.
>
> --
> 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
>
> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
> news:D04B7133-BF76-4BC4-86BC-BA894863B812[ at ]microsoft.com...
> > 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
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> 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.
> >>
> >> --
> >> 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
> >>
> >> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
> >> news:5FE3697F-C0B7-4ED4-A8A8-6A1619037D95[ at ]microsoft.com...
> >> >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
> >>
> >>
> >>
>
>
>
Re: Punctuating properly when mailmerging
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 5/17/2007 6:50:40 PM
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.

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

"tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
news:9F16E74A-C131-4BA5-A023-2FEB499C3A8B[ at ]microsoft.com...
[Quoted Text]
> 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
>
> "Doug Robbins - Word MVP" wrote:
>
>> { 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.
>>
>> --
>> 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
>>
>> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
>> news:D04B7133-BF76-4BC4-86BC-BA894863B812[ at ]microsoft.com...
>> > 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
>> >
>> > "Doug Robbins - Word MVP" wrote:
>> >
>> >> 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.
>> >>
>> >> --
>> >> 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
>> >>
>> >> "tinkerbelle" <tinkerbelle[ at ]discussions.microsoft.com> wrote in message
>> >> news:5FE3697F-C0B7-4ED4-A8A8-6A1619037D95[ at ]microsoft.com...
>> >> >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
>> >>
>> >>
>> >>
>>
>>
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net