format a bookmark

J

Joanne

I am using bookmarks in msword docs to show the value in my access
database table fields.
One of my bookmarks is currency, and I am trying to figure out how to
get the bookmark to show up in the doc in formatted like this
$1,111.00 instead of showing up like this: 1111
I see in the help files that adding the numeric picture switch \# can
be used in field codes, using them within their brackets, but in my
vba routine to fill in my bookmarks, there are no brackets or parens.
The bookmark is only in quotation marks, like so:

If oDocName.Bookmarks.Exists("StartPayRate") = True Then
UpdateBookmark "StartPayRate", Nz(Me!StartPayRate, "")
End If

I don't know where to insert the \# $#,##0.00 numeric picture so that
the final doc is properly formatted.

Could someone please help me get this info in the right spot on my
'setbookmarks' routine?
Thanks
 
D

Doug Robbins

Use Format(Nz(Me!StartPayRate, ""), "$#,##0.00")


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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