Math in fields using values in Document Properties

Joined
Aug 24, 2016
Messages
2
Reaction score
0
I am trying unsuccessfully to perform math in a field from two values ("hours" and "rate") that I've stored in Document Properties. We manage the values in the Document Properties as we are able to access them using our in house FileMaker solution.

The value in the field now is:

{=({DOCPROPERTY hours}*{DOCPROPERTY rate})}

... Which results in:

!Syntax Error, {

Can someone please assist? What mistake am I making with the syntax?

Thanks,
Adam
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
That suggests you've typed the field braces instead of creating them by Ctrl-F9, for example.

PS: Your field code could be reduced to: {={DOCPROPERTY hours}*{DOCPROPERTY rate}}, though you might also want to add formatting switches to control the output's display. For that, see Mailmerge Number & Currency Formatting in the Mailmerge Tips and Tricks thread at:
http://www.msofficeforums.com/mail-merge/21803-mailmerge-tips-tricks.html
or:
http://windowssecrets.com/forums/showthread.php/163017-Word-Mailmerge-Tips-amp-Tricks
 
Joined
Aug 24, 2016
Messages
2
Reaction score
0
That suggests you've typed the field braces instead of creating them by Ctrl-F9, for example.

PS: Your field code could be reduced to: {={DOCPROPERTY hours}*{DOCPROPERTY rate}}

Thanks, macropod!

Tried what you suggested (CTRL+F9) and then adding what you suggested and I am getting the same error. See the enclosed screengrab.

I'm on a Mac but I've followed your steps.
 

Attachments

  • Screenshot 2016-08-25 05.51.12.png
    Screenshot 2016-08-25 05.51.12.png
    22.2 KB · Views: 366

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
Did you use Cmd-F9 for all three sets of field braces? If so, it seems there is something other than just numbers in your DOCPROPERTY fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top