I've tried different VBA string and date value functions to do this but so far, none of them have worked.
I need to pull a date in mm/dd/yyyy format from a form in Access and put it into a Word document.
For the document title and revision, this is the code:
wrdDoc.Bookmarks("title").Range.InsertBefore (CStr(frmName.Document_Title))
wrdDoc.Bookmarks("revision2").Range.InsertBefore (CStr(frmName.Document_Revision))
Initially, I had assumed that using CStr would convert the date to a short date string:
wrdDoc.Bookmakrs("docdate").Range.InsertBefore (CStr(frmName.Document_Date))
but nothing shows up in my Word document at the docdate bookmark. I tried using "Format" to format the date but still nothing. Obviously, I'm doing something wrong.
Ultimately, I would like to convert the date to the following format prior to inserting into the Word file: dd mm yyyy, i.e., 23 February 2017, etc.
Thanks in advance,
Dar
I need to pull a date in mm/dd/yyyy format from a form in Access and put it into a Word document.
For the document title and revision, this is the code:
wrdDoc.Bookmarks("title").Range.InsertBefore (CStr(frmName.Document_Title))
wrdDoc.Bookmarks("revision2").Range.InsertBefore (CStr(frmName.Document_Revision))
Initially, I had assumed that using CStr would convert the date to a short date string:
wrdDoc.Bookmakrs("docdate").Range.InsertBefore (CStr(frmName.Document_Date))
but nothing shows up in my Word document at the docdate bookmark. I tried using "Format" to format the date but still nothing. Obviously, I'm doing something wrong.
Ultimately, I would like to convert the date to the following format prior to inserting into the Word file: dd mm yyyy, i.e., 23 February 2017, etc.
Thanks in advance,
Dar