Inserting Date Information

M

Mike

I am trying to insert the date at a specified location on
the page.

I need to insert the date as text, as I am inserting this
date on a new page every day or so, therefore I can't use
fields.
 
M

Mike

Yes. Try it. It doesn't allow you to put the curser at a
specific location, unless you use the keyboard.
I need to specify a point on the page. (ie. something like
specifying co-ordinates)
 
A

Anne Troy

Perhaps you need a textbox, which can be placed. I don't know that you can
"specify coordinates" that don't yet exist. In other words, without creating
paragraph returns to get to the middle of the page, I don't know how you
could "navigate" to that spot.
**** Hope it helps! ****

~Dreamboat
Excel VBA Certification Coming Soon!
www.VBAExpress.com/training/
********************************
 
J

John Davidson

Mike,
The code below will do what you want. You need to set up a bookmark
called "DateInsertPoint" and copy the code into an AutoNew macro for it
to work.

Selection.GoTo What:=wdGoToBookmark, Name:="DateInsertPoint"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.InsertDateTime DateTimeFormat:="dd MMMM YYYY",
InsertAsField:=False

John D.
 

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