Dates

S

Sahana

Hello

I m looking out for a format when I write dates. I want macros to
change it in Month Date, Year format.

If the date is not present then I want macros to change the format as
Month Year format.

I'm not sure if macros will be able to do it.

I m a newbie with macros. So, i m not sure if I will be able to write
the correct code.
 
G

Graham Mayor

If you are *typing* dates, then type them correctly in the first place. If
you want a macro to *insert* the date then use something like

Sub InsertUSFormatDate()
With Selection
.InsertDateTime DateTimeFormat:="MMMM" & Chr(160) & _
"d," & Chr(160) & "yyyy", InsertAsField:=False
End With
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top