Hello all,
When I run the code below the date format still comes out as mm/dd/yy
instead of the specified mmmm d, yyyy format. Why is that? Is there some kind
of rule against formatting when using the Date() or Now() functions? Is there
a work around to it. I can't just set the actual field on template to be a
Date field because it holds a strings as well as the date. Any suggestions?
Code Sample:
Dim ReturnDate As String
ReturnDate = DateAdd("w", 7, Date)
ActiveDocument.FormFields("ReturnDate").Result = Format(ReturnDate, "mmmm d,
yyyy")
Doug Robbins - 06 Jul 2005 19:24 GMT
Works fine for me as long as the ReturnDate formfield is a Text FormField.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Hello all,
>
[quoted text clipped - 14 lines]
> d,
> yyyy")
axeman - 06 Jul 2005 19:36 GMT
That just goes to show that I'm not paying attention. I had the code right
but I was using the ReturnDate variable in another location of the document
without formatting it before use. I had only formatted it when I set the
result of the formfield. Got it worked out now!
Thanks,
Axe