Math in fields using values in Document Properties

Discussion in 'Word' started by fullcity, Aug 24, 2016.

  1. fullcity

    fullcity

    Joined:
    Aug 24, 2016
    Messages:
    2
    Likes Received:
    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
     
    fullcity, Aug 24, 2016
    #1
    1. Advertisements

  2. fullcity

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    209
    Likes Received:
    15
    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
     
    macropod, Aug 25, 2016
    #2
    1. Advertisements

  3. fullcity

    fullcity

    Joined:
    Aug 24, 2016
    Messages:
    2
    Likes Received:
    0
    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.
     

    Attached Files:

    fullcity, Aug 25, 2016
    #3
  4. fullcity

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    209
    Likes Received:
    15
    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.
     
    macropod, Aug 26, 2016
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. jsduiahd

    Autotext within Fields

    jsduiahd, Jul 1, 2011, in forum: Word
    Replies:
    0
    Views:
    514
    jsduiahd
    Jul 1, 2011
  2. JTBurton2
    Replies:
    4
    Views:
    726
    macropod
    Apr 9, 2012
  3. Mickyh
    Replies:
    0
    Views:
    385
    Mickyh
    Jun 18, 2012
  4. hein86
    Replies:
    1
    Views:
    448
    Geoff_G
    Mar 31, 2014
  5. kate12402
    Replies:
    0
    Views:
    593
    kate12402
    Jun 10, 2014
  6. kate12402
    Replies:
    0
    Views:
    597
    kate12402
    Jun 10, 2014
  7. Helen R
    Replies:
    0
    Views:
    388
    Helen R
    Jun 3, 2015
  8. AhKing
    Replies:
    13
    Views:
    252
    macropod
    Aug 24, 2016
Loading...