HELP: Needing to tackle form fields...

C

Clinton M James

I wish to use form fields in several documents.. I am aware how they work,
but I do not know:

How can i put the date the document is being created on into the form field.
I know how to use a standard field for this, but I would like the form field
to default to the createdate and allow the user the chance of override if
the date needs altering on a future occasion because of an event that they
part-filled the form out, saved it, then completed it later.

Help is appreciated.

Regards,
Clint
 
C

Cindy M -WordMVP-

Hi Clinton,
How can i put the date the document is being created on into the form field.
I know how to use a standard field for this, but I would like the form field
to default to the createdate and allow the user the chance of override if
the date needs altering on a future occasion because of an event that they
part-filled the form out, saved it, then completed it later.
This would require a macro, say one named AutoOpen so that it would execute
when the document is opened; or AutoNew if a document is being created from a
template (probably better, as you might later want to open an existing form).

Example:

Sub AutoNew()
ActiveDocument.FormFields( _
"NameOfField").Result = Format(Date, "dd-MMM-yyyy")

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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