Mail merge formatting

S

sbarker

I have an Access 2003 database where some of the number fields are in
scientific format.

In Word 2003 when I insert the scientific formatted fields, they
appear in decimal format.

How can I get Word to duplicate the scientific format of the original
Access field?
 
R

Robert M. Franz (RMF)

Hello sbarker

I have an Access 2003 database where some of the number fields are in
scientific format.

In Word 2003 when I insert the scientific formatted fields, they
appear in decimal format.

How can I get Word to duplicate the scientific format of the original
Access field?

the standard (short) answer to questions like this is: change the
connection method, or add formatting switches to the MERGEFIELDs in Word.

In your specific situation, I'm not sure there really _are_ formatting
switches. You might have to resort to add a field to access which
converts the number to text, and bring that information into Word.

HTH
Robert
 
S

sbarker

Thanks for the reply Robert.

I can't find a MERGEFIELD scientific notation switch. Your suggestion
of converting the number to text sounds in Access good; but I think
Access will probably take a number like 1.1E2 and convert it to 110.
I am dealing with very small numbers, such as 5.1E-9 and I think the
text conversion will be 0.00000000051. At any rate I'll give it a try
and let you know.
 
G

Graham Mayor

From the Tools menu in Word, select Options and then go to the General tab
and check the box against the "Confirm conversions at open" item. Then when
you attach the data source to the mail merge main document, you will be
given the option of using the DDE method of connection which should read the
data as you have it formatted in the table.

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


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

macropod

Hi sbarker,

If you code your mergefield as:
{QUOTE
{SET z{MERGEFIELD dbValue}}
{SET a{=ABS(z)}}
{SET
b{=9-(a<10^9)-(a<10^8)-(a<10^7)-(a<10^6)-(a<10^5)-(a<10^4)-(a<10^3)-(a<10^2)-(a<10^1)-(a<10^0)-(a<10^-1)-(a<10^-2)-(a<10^-3)-(a<10^-4)-(a<10^-5)-(a<10^-6)-(a<10^-7)-(a<10^-8)}
{SET c{=int(a/10^b)+mod(a,10^b)/10^b}
{c \# 0.00}E{b \# +00;-00}}
where 'dbValue' is your mergefield's name, any numbers between 10^-9 and 10^9 will be expressed in scientific notation. You can
increase the number of expressions in either direction if need be.

Note: the field braces (ie ' { }') are all created in pairs via Ctrl-F9 - you can't just type them in.

Cheers
 

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