Word Automation: Date Format

M

Mark

I'm trying to use bookmarks in a Word Document to
generate a form letter with Access data, like this:

WordObj.ActiveDocument.Bookmarks("ClsDate2").Select
Me![ClsDate].SetFocus
WordObj.Selection.TypeText [ClsDate].Text

How can I change the format in which the date is output,
e.g., 24 November 2004?
 
J

Jonathan West

Hi Mark,

Use the Format function to modify the layout of the string you send in the
TypeText command.
 
M

Mark

Thanks, Jonathan! I can get the date in the format I want excepting for the suffix--such as the "st" on 1st and the "nd" on 2nd. I assume I need some If...Then statements but I can't seem to make em work?!
 

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