Has anyone had any luck in adding a st (for 1), nd (for 2) rd (for 3) or th (for 4,5,6,7,8,9,0) following the DD in this code?
Quote:
Originally Posted by macropod
Try:
Code:
Private Sub cmdOK_Click()
Application.ScreenUpdating = False
Dim BmkNm As String, NewTxt As String, BmkRng As Range
BmkNm = "DateFiled"
With ActiveDocument
If .Bookmarks.Exists(BmkNm) Then
Set BmkRng = .Bookmarks(BmkNm).Range
BmkRng.Text = Format(dtDateFiled.Value, "MMMM DD, YYYY ")
.Bookmarks.Add BmkNm, BmkRng
Else
MsgBox "Bookmark: " & BmkNm & " not found."
End If
End With
Set BmkRng = Nothing
Application.ScreenUpdating = True
Unload Me
End Sub
|