calculations in mail merge

2

2shelbys

Hello,
I need to perform a simple calculation in a mail merge document and I can
not find anything anywhere on how to do it. All I need to do is to multiply a
number from one of the columns in my data file by a number I can input. I
have looked in the tutorial and online and can not find anything. Can someone
please tell me in plain english the easiest way to set up the document to
perform this operation? Your help is most appreciated.
 
G

Graham Mayor

You need a field calculation using a formula field e.g.

Let's assume that you want to multiply the content of a mergefield called
fieldname by 2 then

{={Mergefield fieldname} * 2}

Both sets of field brackets are entered with CTRL+F9 the remainder is typed.

Obviously the mergefield must have a numeric content.

See also http://www.gmayor.com/formatting_word_fields.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

macropod

Hi 2shelbys,

Taking Graham's response one step further, so that you can do your input, you could insert a FILLIN field into the equation, as in:
{={Mergefield fieldname}*{FILLIN "What value"}}
You can add switches to the FILLIN field to set a default response and to control whether you will be prompted for every record. See
Word's Help file for more details.

Cheers
 
R

rufus_the_tailgunner

Hi all,
I have a table in a mail merge doc that I want to partly populate with data
at the point of mail-merge and partly with user defined data, which is to be
entered after the the merge takes place. After the user has entered their
data the columns in the table needed to be recalculated to reflect the total.
I tried various strategies - like using ASK fields, REF fields and Bookmarks
- but found that the pop-up boxes for the user-defined data came up
automatically before the user had a chance to look at the merged document.
Currently the method I am adopting is to create some application event
procedures - detailed helpfully in
http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm - so that a series of
Input Boxes pop up when an event occurs, which I'm hoping will be triggered
when the user clicks into the table where my data is held, or as the result
of clicking a command button.
The problem with this approach however is that it involves a bit of VBA
programming so it won't be within everyone's capabilities - it's a shame MS
don't make this kind of event handling a bit easier for general users !

Rufus

macropod said:
Hi 2shelbys,

Taking Graham's response one step further, so that you can do your input, you could insert a FILLIN field into the equation, as in:
{={Mergefield fieldname}*{FILLIN "What value"}}
You can add switches to the FILLIN field to set a default response and to control whether you will be prompted for every record. See
Word's Help file for more details.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

2shelbys said:
Hello,
I need to perform a simple calculation in a mail merge document and I can
not find anything anywhere on how to do it. All I need to do is to multiply a
number from one of the columns in my data file by a number I can input. I
have looked in the tutorial and online and can not find anything. Can someone
please tell me in plain english the easiest way to set up the document to
perform this operation? Your help is most appreciated.
 

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