View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Mergefield formatting codes seem to combine digits in numeric data


Let me get this right?

If the data contains 371.4 then {Mergefield Fieldname} displays 371.4
but {Mergefield Fieldname \# "$,0.00"} displays 375 ?
I cannot see any mechanism whereby that should happen, however try two
things
1. {Mergefield Fieldname \# "$,0.00" \*Charformat}
2. {QUOTE{Mergefield Fieldname} \# "$,0.00"}
Don't forget to update the field after making changes (F9).

I take it your regional settings are English and that the default thousands
separator is ',' and decimal '.' ?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


wrote:
So I have a DOC file which mail merges from a SQL Server view. The
source data field is a SQL Server "money" type. It should display as a
dollar and cents value within Word. And it works fine except if there
is just a single non-zero digit to the right of the decimal point in
the raw data. If no formatting fields are supplied in the MergeField,
the data appears as 50.9, or 371.4, as I'd expect. However I've yet
to find a formatting for the mergefield which correctly dipslays the
missing trailing 0. Instead Word seems to combine digits. For instance
if the source data is 371.40, it displays as '375.00'; if the soruce
is
50.9, it displays as 59.0 If the raw data has two digits to the right
of the decimal point however, e.g. 549.23, it displays correctly in
Word. I've tried innumerable varieties of format codes (\# $#,###.##,
\# $#,###.#0, \# $#,###.00, \# #,###,##0.00 \# $,0.00 \#$0.00 etc.
etc) with the same results each time. Anyone ever run into this
before? Even better, anyone know a solution? (Word 2003 / SP2 running
on Windows Server 2003, SP1; SQL Server 2000).

= Marchand =