Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Forms Field Problems
I am preparing a form, using Form Fields. I format a text field as unlimited
in length, current date, with the option of entering data if necessary. Then, while inputting the date, Word suggests the current date while I accept by using the Tab Key. As soon as hit the key, Word responds with a message that correct date is necessary. How can I get Word to input the current date, as formatted in the Form Field Properties Box for that field, while still retaining the ability to enter another date if I want? And why is Word giving me an error when I accept its suggested date? Thanks in advance for any help. |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Forms Field Problems
A lot of features are unavailable in a protected document. I suspect
what you are seeing is a result of that: As you press the Tab key, instead of performing autocomplete, Word tries to move to the next form field, which generates an error message because the format of the date form field will be incorrect. The simplest fix would be to just type the date in, ignoring the autocomplete suggestion. You may want to turn off the autocomplete feature (on the AutoText tab of the Tools | AutoCorrect Options dialog box), to reduce confusion. Note, however, that this is *not* a document setting; it has to be done for all Word installations (users). You may want to ask in a programming newsgroup if there is a macro workaround. -- Stefan Blom Microsoft Word MVP "abradaxis" wrote in message ... I am preparing a form, using Form Fields. I format a text field as unlimited in length, current date, with the option of entering data if necessary. Then, while inputting the date, Word suggests the current date while I accept by using the Tab Key. As soon as hit the key, Word responds with a message that correct date is necessary. How can I get Word to input the current date, as formatted in the Form Field Properties Box for that field, while still retaining the ability to enter another date if I want? And why is Word giving me an error when I accept its suggested date? Thanks in advance for any help. |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Forms Field Problems
Hi abradaxis,
If you'd like to have the formfield automatically insert a given date as the default, you could use an 'On Entry' macro coded like: Sub DefaultDate() With ActiveDocument .Unprotect Password:="" If Not IsDate(.FormFields("Text1").Result) Then 'For Today: .FormFields("Text1").Result = Format(Date, "d/M/yyyy") 'For 14 days hence: '.FormFields("Text1").Result = Format(DateAdd("d", 14, Date), "d/M/yyyy") End If .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="" End With End Sub The above macro includes code for both today (active) and 14 days hence (commented out). Your users would, of course, need to know they can replace the default date. Cheers -- macropod [MVP - Microsoft Word] "abradaxis" wrote in message ... I am preparing a form, using Form Fields. I format a text field as unlimited in length, current date, with the option of entering data if necessary. Then, while inputting the date, Word suggests the current date while I accept by using the Tab Key. As soon as hit the key, Word responds with a message that correct date is necessary. How can I get Word to input the current date, as formatted in the Form Field Properties Box for that field, while still retaining the ability to enter another date if I want? And why is Word giving me an error when I accept its suggested date? Thanks in advance for any help. |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Forms Field Problems
Thank you for clearing up the confusion. Thanks to all who responded.
"Stefan Blom" wrote in message ... A lot of features are unavailable in a protected document. I suspect what you are seeing is a result of that: As you press the Tab key, instead of performing autocomplete, Word tries to move to the next form field, which generates an error message because the format of the date form field will be incorrect. The simplest fix would be to just type the date in, ignoring the autocomplete suggestion. You may want to turn off the autocomplete feature (on the AutoText tab of the Tools | AutoCorrect Options dialog box), to reduce confusion. Note, however, that this is *not* a document setting; it has to be done for all Word installations (users). You may want to ask in a programming newsgroup if there is a macro workaround. -- Stefan Blom Microsoft Word MVP "abradaxis" wrote in message ... I am preparing a form, using Form Fields. I format a text field as unlimited in length, current date, with the option of entering data if necessary. Then, while inputting the date, Word suggests the current date while I accept by using the Tab Key. As soon as hit the key, Word responds with a message that correct date is necessary. How can I get Word to input the current date, as formatted in the Form Field Properties Box for that field, while still retaining the ability to enter another date if I want? And why is Word giving me an error when I accept its suggested date? Thanks in advance for any help. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problems Using Protected/Unprotected Forms | Microsoft Word Help | |||
Creating multiple TOC | Page Layout | |||
Drop down field on forms | Microsoft Word Help | |||
Word Forms - problems with document protection and certain fields | Microsoft Word Help | |||
Date Field Code problems | Mailmerge |