Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
AJOLSON AJOLSON is offline
external usenet poster
 
Posts: 2
Default VBA Format Number

I have a word document that is mail merged with access. I have a number that
is formatted in Access to be a percent However when I merge it with the
word document I get .23 instead of 23%. I know I have to set the format to
read as percent but cant figure out how to do that in word. I have VB €“
Basic opened for the document an have this code:

Format([DailyAveOIl1], "Percent") But it does not work [DailyAveOil1] is
the merged field.

Any help would be great. Thanks

Andy

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default VBA Format Number

Hi Andy,

In Word:
.. select your mergefield, which will look something like «Percent»
.. press Ctrl-F9 to wrap another field around it, thus - { «Percent» }
.. edit the field so that you get {=«Percent»*100 \# 0.00%}
.. press F9 to update the field
.. run your mailmerge

Note: the precision of the displayed value is controilled by the '0.00'. You can use anything from '0' to '0.000000000000000'.

--
Cheers
macropod
[MVP - Microsoft Word]


"AJOLSON" wrote in message ...
I have a word document that is mail merged with access. I have a number that
is formatted in Access to be a percent However when I merge it with the
word document I get .23 instead of 23%. I know I have to set the format to
read as percent but cant figure out how to do that in word. I have VB €“
Basic opened for the document an have this code:

Format([DailyAveOIl1], "Percent") But it does not work [DailyAveOil1] is
the merged field.

Any help would be great. Thanks

Andy


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
number format dp Tables 4 April 27th 08 07:35 AM
Number format and 0's tamee Mailmerge 1 March 19th 07 09:20 PM
Number format field wordspinster Page Layout 1 August 5th 06 12:21 AM
number format Catherine Microsoft Word Help 3 June 2nd 06 09:30 PM
How do I make an automatic number small caps under Number Format? grebop Microsoft Word Help 3 October 17th 05 05:31 AM


All times are GMT +1. The time now is 08:19 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"