In Word 2007, how to change format of a percent in a merge field

N

njt

I am merging information from an Access database into a word document. When
I merge in a number that is a percentage in Access (eg. 24.5%), it merges
into the word document as 0.2456#####%. I cannot figure out how to reformat
this to 24.5% in the merged document. PLEASE HELP!!! I am frustrated!!
 
M

macropod

Hi njt,

Select your mergefield and press Ctrl-F9 to wrap your mergefield in another field. You get something like '{ «Percent» }'
Edit the field coding to look like '{=«Percent»*100 \# 0.00%}'
The number of 0s after the decimal point control the precision.
 
D

drkusa

macropod said:
Hi njt,

Select your mergefield and press Ctrl-F9 to wrap your mergefield in another field. You get something like '{ «Percent» }'
Edit the field coding to look like '{=«Percent»*100 \# 0.00%}'
The number of 0s after the decimal point control the precision.

--
Cheers
macropod
[MVP - Microsoft Word]


njt said:
I am merging information from an Access database into a word document. When
I merge in a number that is a percentage in Access (eg. 24.5%), it merges
into the word document as 0.2456#####%. I cannot figure out how to reformat
this to 24.5% in the merged document. PLEASE HELP!!! I am frustrated!!
 
D

drkusa

Macropod,

When I do as you instruct, Word formats the field as desired. However, when
I do the merge, it changes the field in the form document to the text of the
first record and eliminates the field instruction, which is no longer
functional for merging.

Case in point: With the file I'm working on, in the master form document it
first reads as you describe: {=«Percent»*100 \# 0.00%}.

But after I merge it - or even check it with the View Merged Document toggle
button, it reads 7.13% (data from the first record in the database). The
field instruction has been replaced by straight text and cannot be used for
any additional merges.

How can I make the field instruction sticky?
 
M

macropod

Hi drkusa,

With mailmerges, the mergefields are always replaced by the data from the fields they reference. Provided the field coding is
correct in your main mailmerge document, all the merged files it generates will have the correct result and formatting.

If you need the same figure replicated in various locations in your document, either:
.. bookmark the field and use cross-references to it; or
.. copy & paste the field to each location.
 

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