Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mail Merge Math - Syntax Error

927 views
Skip to first unread message

MerissaGargiulo

unread,
Sep 7, 2012, 2:08:32 PM9/7/12
to

Hello. I'm trying to perform the following calculation on merge fields
in Word 2003:
{ =(({ MERGEFIELD "BuyerLotPrice" }-{ MERGEFIELD "BuyerLotIncentive"
})+({ MERGEFIELD "BuyerBaseHousePrice" }-{ MERGEFIELD
"BuyerBaseHouseIncentive" }))}

My goal is this in normal math terms:
(BuyerLotPrice-BuyerLotIncentive) +
(BuyerBaseHousePrice-BuyerBaseHouseIncentive)

I keep getting "Syntax Error". The document recognizes the amounts of
each field individually, it just isn't performing the math.

Assuming I typed everything correctly above since it wouldn't paste, can
anyone tell me what I'm doing wrong? This is my first attempt at mail
merge math, though I'm familiar with Excel math and somewhat familiar
with database fields. I've tried different google searches to solve this
on my own, and I just cannot find a good resource for syntax help for
this subject. Thank you.




--
MerissaGargiulo

Lisa Wilke-Thissen

unread,
Sep 9, 2012, 7:18:18 AM9/9/12
to
Hi,

[Word 2003]
> { =(({ MERGEFIELD "BuyerLotPrice" }-
> { MERGEFIELD "BuyerLotIncentive"})+
> ({ MERGEFIELD "BuyerBaseHousePrice" }-
> { MERGEFIELD "BuyerBaseHouseIncentive" }))}

It should be:

{ = { Mergefield A } -
{ Mergefield B } +
{ Mergefield A } -
{ Mergefield A } }

Ctrl + F9 will insert an empty pair of brackets. After typing "=" you
can insert the Mailmerge fields by using the Mail Merge toolbar (or
other ways you usually use).
You have to type manually just the operators "+" and "-".
Switch between Word field codes and field results by pressing Alt + F9.

--
Cheers
Lisa [MS MVP Word]


Lisa Wilke-Thissen

unread,
Sep 9, 2012, 7:20:32 AM9/9/12
to
Sorry,

Of course it should be:

{ = { Mergefield A } -
{ Mergefield B } +
{ Mergefield C } -
{ Mergefield D } }

You mentioned 4 different Mailmerge fields.

rbp2

unread,
May 30, 2013, 6:21:01 PM5/30/13
to
MerissaGargiulo wrote on 09/07/2012 14:08 ET :
> Hello. I'm trying to perform the following calculation on merge field
> in Word 2003
> { =(({ MERGEFIELD "BuyerLotPrice" }-{ MERGEFIELD
> "BuyerLotIncentive
> })+({ MERGEFIELD "BuyerBaseHousePrice" }-{ MERGEFIEL
> "BuyerBaseHouseIncentive" }))
>
> My goal is this in normal math terms
> (BuyerLotPrice-BuyerLotIncentive)
> (BuyerBaseHousePrice-BuyerBaseHouseIncentive
>
> I keep getting "Syntax Error". The document recognizes the amounts o
> each field individually, it just isn't performing the math
>
> Assuming I typed everything correctly above since it wouldn't paste, ca
> anyone tell me what I'm doing wrong? This is my first attempt at mai
> merge math, though I'm familiar with Excel math and somewhat familia
> with database fields. I've tried different google searches to solve thi
> on my own, and I just cannot find a good resource for syntax help fo
> this subject. Thank you
>
>
> MerissaGargiulo
>
i'm having a similar problem with even a less complex equation, simply two
fields.
{={mergefield 1}+{mergefield 2}} ... result is !Syntax Error,

Lisa Wilke-Thissen

unread,
May 31, 2013, 7:52:20 AM5/31/13
to
Hi,

> i'm having a similar problem with even
> a less complex equation, simply two fields.
> {={mergefield 1}+{mergefield 2}} ... result is !Syntax Error,

what version of Word, what language is used? How did you create the fields?

--
Cheers,
Lisa [MS MVP Word]

annmarie...@gmail.com

unread,
Sep 9, 2013, 4:18:37 PM9/9/13
to
Hello,

I am having the same problem, except I am subtracting numbers. I get a Syntax error when i substract a negative number... help!
{={mergefield 1}-{mergefield 2}}
where mergefield2 < 0

Lisa Wilke-Thissen

unread,
Sep 14, 2013, 3:45:55 AM9/14/13
to
Hi,


> I am having the same problem, except I am
> subtracting numbers.
> I get a Syntax error when i substract a negative
> number... help!
> {={mergefield 1}-{mergefield 2}}
> where mergefield2 < 0

did you read my questions? Please answer them, otherwise it is difficult to
find the solution.

noorsyazwa...@gmail.com

unread,
May 31, 2016, 5:08:55 AM5/31/16
to
Hi. Can I know how you solve this problem?
0 new messages