View Single Post
 
Old 04-29-2014, 05:28 PM
alshcover alshcover is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Apr 2014
Posts: 9
alshcover is on a distinguished road
Question Update Bookmarks from a Userform

What I have done so far:
  • I created a UserForm.
  • I added a Control (DTPicker) and named it "dtDateFiled".
  • I added a Control (CommandButton) and named it "cmdOK".
  • I inserted a bookmark in the Word Template titled "DateFiled"; therefore, the date that the User selects on the UserForm (dtDateFiled) shows up in the Word document.

Here is the code:

Quote:
Private Sub cmdOK_Click()
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("DateFiled").Range.Text = dtDateFiled.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
What currently happens:
The date selected by the User is inserted at the bookmark just fine, but the date displays in this format: MM/DD/YYYY (e.g., 4/29/2014).

Question:
How do I change the date format to display: Month DD, YYYY (e.g., April 29, 2014)?
Reply With Quote