Date field in a locked form

C

Connie Martin

Tell me, please, if this is possible. I have a template done with fields and
the form is locked in order to easily access drop-down menus, etc. In the
date field, this is what I would like: when the form opens it would be the
current date, but can be over-ridden with any date the user desires. The way
it stands now, the current date is there when the form is opened, but the
only way the user can change the date, which is required occasionally, is to
unlock the form, change the date and relock the form. I would like it to be
more user-friendly than that. Is there a way? Connie
 
G

Graham Mayor

Assuming the date field is Text1 add the following macro to the template

Sub AutoNew()
ActiveDocument.FormFields("Text1").Result = Now
End Sub

Set the field as date type with the format of your choice.
When you create a new document from the template, the field will be filled
with the current date which can be overwriiten.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

You are welcome :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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