Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2003
    Location
    New York, New York, USA
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form Field Default (Word 2000)

    I want to have a date field on my form, which defaults to Today, but allows the user to change to some other date.
    In the Field Options dialog, the Default Date field doesn't allow me to enter a field code like {DATE} or ={DATE}. It gives an error message about entering a valid date. If I pick the current date in the type dropdown on the left, then I can't change today's date to anything else.
    Is there a way to fix this in Word 2000?
    Thanks in advance - Mak

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Field Default (Word 2000)

    You could call the following macro in a Document_Open macro if you want the date to be set when the document is opened. Alternatively, you could set it to be run when the form field is entered. Replace "Text1" by the name of the bookmark associated with the form text box (you can see/modify this name if you double click the form field while the document is unprotected.)

    Sub SetDate()
    With ActiveDocument.FormFields("Text1")
    If .Result = "" Then
    .Result = Date
    End If
    End With
    End Sub

  3. #3
    2 Star Lounger
    Join Date
    Oct 2003
    Location
    New York, New York, USA
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form Field Default (Word 2000)

    Hans,
    Thank you. I'll try it.

    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •