UPDATE: I got my date function to return the way it should, so I am fine with the date.
I was able to get the date to work by using the following line:
Code:
.Selection.Text = Format(Forms!WebBasedIFV!reportDateText, "mmmm dd, yyyy")
I am working on automating a report from Access 2007 to Word 2007. I have everything pretty much working, but having to update some minor things.
I am having issues with being able to format the date to a particular way once the information is passed to Word.
Here is the code I have for the date (I am trying to have the date formatted to January 1, 2013 format)
Code:
'Move to each bookmark and insert the text from the form
.ActiveDocument.Bookmarks("reportDate").Select
.Selection.Text = (CStr(Forms!WebBasedIFV!reportDateText.Format = "mmmm dd, yyyy"))
'reapply the bookmark name to the selection
.ActiveDocument.Booksmarks.Add Name:="reportDate", Range:=Selection.Range
Anyone who can assist would be extremely appreciative.