I'm trying to put a date 7 days from today into a Word document. So far I've found the easiest way is through a macro using the dateadd function, but I can only get it formatted in the System's Short Date format, which is currently set to yyyy-mmm-dd, so I get 2008-Jun-26 when I'd like June 26, 2008.
The article I pulled this from showed the formula as
***
Sub PrevMonth()
Dim mBefore As Date
mBefore = Format(DateAdd("m", -1, Date), "mmmm d, YYYY")
Selection.InsertBefore mBefore
End Sub
***
but the date doesn't format as expected. Is there a way to tell vb to use the long date, like with the vblongdate statement?
Thanks,
The article I pulled this from showed the formula as
***
Sub PrevMonth()
Dim mBefore As Date
mBefore = Format(DateAdd("m", -1, Date), "mmmm d, YYYY")
Selection.InsertBefore mBefore
End Sub
***
but the date doesn't format as expected. Is there a way to tell vb to use the long date, like with the vblongdate statement?
Thanks,