I'm just a beginer with VBA for word. I've got a macro
that puts my address on a letter but I'd like to add the
date right after it. Is there anyway to do this by
recording the macro? If possible, can anyone send me the
code to get the date in. Thanks, Paul Morris...

Re: Need macro to get date in letter.... by Charles

Charles
Mon Sep 27 19:40:25 CDT 2004

You could insert a field code:

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:="DATE \@ ""MMMM d, yyyy"" ", PreserveFormatting:=True

or just the date as text:

Selection.InsertAfter (Format(Now(), "Mmmm dd,yyyy"))

Also, you probably will want to use a

Selection.TypeParagraph

before and after to space your date on a different row... (or you could use
a Tab : Selection.TypeText vbTab)


--
Charles
www.officezealot.com
"Paul Morris" <pmm_boston@yahoo.com> wrote in message
news:267c01c4a4f1$79e1a0c0$a501280a@phx.gbl...
> I'm just a beginer with VBA for word. I've got a macro
> that puts my address on a letter but I'd like to add the
> date right after it. Is there anyway to do this by
> recording the macro? If possible, can anyone send me the
> code to get the date in. Thanks, Paul Morris...