exporting data to Word using bookmarks

  • Thread starter Thread starter Yilmaz
  • Start date Start date
Y

Yilmaz

Hello,
I have written some VB code to export data from a form in
access into bookmarks in Word.
The process works just fine apart from 2 areas where I
just cannot seem to get what I want.
1: The number format in access is not retained when sent
to word ie. $20,000 in access becomes 20000 in word.
2: I cannot get the date in word to appear in the right
format. ie. in access the date is 08/01/2004 and the
format is set such that it appears as 08 January 2004.
However, when this is sent to word (using bookmark) it
shows up as 08/01/2004.

I would really appreciate some help on this if anyone
knows.
Thanks
 
Try formating the values as you send it, it works form me.
e.g.

odoc.Bookmarks.Item("BookMarkName").Range.Text = Format(Me.
[FieldName, "currency")

(odoc = word.documents.add)

Rgds,
Glenn.
 
Back
Top