Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default value for mergefiled (2003/11.8202.8202)

    Hi,

    I'd like to default a mergefield to 0 if it is undefined. Is there any quick way to do this, like with a switch or some function, rather than an "If" statement? If so would you please provide an example?

    I was hoping to use it in a calculation like (my own syntax):

    {={default{MERGEFIELD field1 },0}+{default{ MERGEFIELD field2 },0} # "Pos;Neg"}

    Thanks
    Jay

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Default value for mergefiled (2003/11.8202.8202)

    Hi Jay,

    Try:
    {QUOTE{SET Val1 {MERGEFIELD Val1}}{SET Val2 {MERGEFIELD Val2}}{=Val1+Val2 # "Pos;Neg"}}
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Mar 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default value for mergefiled (2003/11.8202.8202)

    Yep that worked. Thanks

    Jay

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •