How can I get word to total numbers with out using a TABLE?

J

Jacknjax

How can I get word to total numbers with out using a TABLE? I have a word
document that is mail merged from an SQL dataqbase and I need a series of
numbers totaled in the word document without using a table.
 
P

Peter Jamieson

Do all the numbers you need to add up all come from the same record in your
database?

If so, you can probably do the calculation using a formula field ( { = }
field), for example, if you need to add fielda and fieldb, use

{ ={ MERGEFIELD fielda }+{ MERGEFIELD fieldb } }

where all the {} are the special field code braces you can insert using
ctrl-F9.

(another way to do it is to use an SQL view, but you may not be in a
position to do that).

If you have to add up values coming from multiple records, you can either
a. try to create an SQL VIEW to do the right thing (may or may not be
possible) or
b. add up the values as you go along, e.g. if you need to add up fielda for
several records, you might use something like

{ IF { MERGESEQ } = 1 "{ SET fieldatotal 0 }"
}{ SET fieldatotal { ={ REF fieldatotal }+{ MERGEFIELD fielda } }

but it depends on whether you are adding up the whole sequence, or so many
records at a time, etc.

Peter Jamieson
 

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