Thread: Mailmerge Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Mailmerge Help

Hi Fred,

You can overcome this with a compound field coded along the lines of:
{QUOTE{SET Val1 {MERGEFIELD Data1}}{SET Val2 {MERGEFIELD Data2}}{=Val1+Val2 \# 0}}

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[MVP - Microsoft Word]


"Fred" wrote in message ...
I have a program that interfaces with WORD for mailmerges but unfortunately
the program passes a blank as a null instead of a "0" when it comes to
numbers. Here is my example I am hoping someone can help me. I am trying to
add two fields "a" and "b" together but sometimes the "b" value might be
blank and word errors out when it trys to add a value and a blank. I need
help to properly add "a" and "b" when "b" is a null or if it has a number.

I hope someone seems to understand my delima and can help out.

Thansk,

Fred