Format Bookmarks

K

Kenny G

Hello,

I have nine bookmarks in my Word.dot document that are percentages. Before
leaving Access I have the query formatted to reflect the percentage as two
decimal points, however, when the data shows up in Word I get a different
format.

Access formatted as: 78.00%
Word bookmark is: 0.782339

Any ideas on how this can be rectified?

Thanks,
 
P

Perry

Don't let yr query format percentage values, for 2 reasons:

- performance; yr query will execute faster.
- maybe more important, the results are more reliable when formatting is
done at the receiving point (in this case Word)
and not while executing a query.

In Word you would receive the value like in below snip of pseudo code:
(whereby "dPerc" represents a field with the 'percentage' in your query,
and "doc" a valid/instantiated Word document object)

doc.BookMarks("MyBookmark").Range = _
Format(dPerc * 100, "##.00") & " %"

Krgrds,
Perry
 

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