Inserting an automatic date and time macro

D

Dale Jakins

Is there a Macro that I can insert into Word 2007 that would allow me to keep
a journal for instance....I could click Ctrl + D and then it would insert the
current date and time? Does anyone know how to program that?? I've done
this in word before and can't remember how to program it.

Any help would be so greatly appreciated!!!
 
G

Greg Maxey

You could assign something like the following to a keyboard shortcut:

Sub DateStamp()
With Selection
.InsertAfter "Captain's Log stardate "
.Collapse wdCollapseEnd
.InsertDateTime DateTimeFormat:="MMMM dd, yyyy HH:MM:SS: ",
InsertAsField:=False
End With
End Sub
 

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