Merge Word Bookmarks

G

Guest

I am merging an Access Form to a Word document using this code (in part).

.ActiveDocument.Bookmarks("Bonus").Select
.Selection.Text = (CCur(Forms!MLOG!Bonus))
I am unable to get the figures in the Word document to look like the ones on
the Form. I've used CCur as well as CStr and the Form shows $1,500.00, but
Word shows simply 1500. I used Currency for the Table and Form Properties.
This part of the Form is a result of multiplying two entries. Another place
that I chose 3 decimals for a quotient shows anywhere from none (for ans. of
1) to 15 decimal points (for say 1/3). H*E*L*P!
Scafidel
Lafayette, LA
 
G

Guest

Hi Scafidel,

In your word document go the the specific field where the currency data is
filled.
Now press ALT-F9 this will toggle the field codes belonging to the fields.
You should see something like: {YourFieldname \* Mergeformat}

Change this to:

{Yourfieldname \# "€ #.##0,00"}

Where yourfieldname is the fieldname from the database and the currency
format should be changed to the appropriate format from your country. I
supplied the european format for the euro but if you want te replace it by
something other that can be done. A simple trick is to go to Excel, type a
number change this to the appropriate currencyformat you like. Go to Format
Cells and look under the custom format. There you will see the format you
have chosen. Copy this and paste this into the fieldcode from Word. Should do
the trick.

hth
 
A

AnandaSim

Hi Scafidel,

In your word document go the the specific field where the currency data is
filled.
Now press ALT-F9 this will toggle the field codes belonging to the fields.
You should see something like: {YourFieldname \* Mergeformat}

Change this to:

{Yourfieldname \# "€ #.##0,00"}

I don't see Scafidel using fieldcodes. He/She is selecting on a Word
bookmark and replacing the Word bookmark with data.

Scafidel - instead of using Cstr or Ccur use Format() - look up the
format character placeholders in Help....

HTH
Ananda
 
G

Guest

Unfortunately I am using Bookmarks instead of the usual Fields and ALT-F9
doesn't seem to do anything.
 

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