I’m having trouble with a script that is supposed to format a date picker in Word (Mac).
No matter what I try, I can’t seem to get the display format correct.
Can someone please help me figure out if there’s something wrong with my script or if there’s another format or setting I need to change?
Here’s the script I’m using:
Sub AddCustomDatePicker()
Dim objCC As ContentControl
Dim objDate As Date
Dim formattedDate As String
Set objCC = ActiveDocument.ContentControls.Add(wdContentControlDate)
objDate = Date
formattedDate = Format(objDate, "dddd d mmm yy")
objCC.Range.Text = formattedDate
End Sub
It works, but the date always displays as 1/07/24 when i want Monday 1 June 24.
p.s I’m only following online instructions , I do not have any knowledge in this area.
Jonathon S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1