I wrote a macro that reformats a word doc. and would like to add to the bottom of the document the time it was created. Can this be done with VBA.
I wrote a macro that reformats a word doc. and would like to add to the bottom of the document the time it was created. Can this be done with VBA.
Russ
Hi Russ,
You need to Insert a Field of CreateDate. I just recorded this - it was easier thn coding it ..
[VBA]Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"CREATEDATE \@ ""dd/MM/yyyy HH:mm:ss""", PreserveFormatting:=True[/VBA]
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Thanks Tony I will give it a try and let you know how I make out.
Russ
Russ
Tony
Thanks, I tried this out today and it works fine. I will have to play with it to make it work the way I would like, but it does the trick.
Thanks again
Russ