Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Use current date in the default date form field option
I am creating a form and I would like the current date (the day the
user works on the form) to be the default, but I need the user to have the option to type over that date if necessary. I am sure this is a simple option, but I can't seem to find the right way to insert the current date as the date field default option. Please help! Thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Use current date in the default date form field option
On 7 Apr 2007 09:20:00 -0700, wrote:
I am creating a form and I would like the current date (the day the user works on the form) to be the default, but I need the user to have the option to type over that date if necessary. I am sure this is a simple option, but I can't seem to find the right way to insert the current date as the date field default option. Please help! Thanks Place the following macro in the template for your form (http://www.gmayor.com/installing_macro.htm) and change the form name in quotes to the name of the actual field in your template. Sub AutoNew() ActiveDocument.FormFields("DateField").Result = CStr(Now) End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Use current date in the default date form field option
Jay - Thanks so much!
I am afraid I am pretty new to Macros and I am getting Compile Error : Syntax error. I changed the field name ... any ideas on how I could have screwed up something so simple? On Apr 7, 11:44 am, Jay Freedman wrote: On 7 Apr 2007 09:20:00 -0700, wrote: I am creating a form and I would like the current date (the day the user works on the form) to be the default, but I need the user to have the option to type over that date if necessary. I am sure this is a simple option, but I can't seem to find the right way to insert the current date as the date field default option. Please help! Thanks Place the following macro in the template for your form (http://www.gmayor.com/installing_macro.htm) and change the form name in quotes to the name of the actual field in your template. Sub AutoNew() ActiveDocument.FormFields("DateField").Result = CStr(Now) End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Use current date in the default date form field option
Change the field bookmarkname in the form to DateField rather than in the
macro - then it becomes even more difficult to screw it up Note too that this macro goes in the form template and NOT in normal.dot. Jay did say this in his original post, but it is worth emphasising. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jay Freedman wrote: Don't try to type the macro into the editor -- it's too easy to make a mistake without knowing what you're doing. Just copy the three lines from the post and paste it into the editor, and then change the field name. Jay - Thanks so much! I am afraid I am pretty new to Macros and I am getting Compile Error : Syntax error. I changed the field name ... any ideas on how I could have screwed up something so simple? On Apr 7, 11:44 am, Jay Freedman wrote: On 7 Apr 2007 09:20:00 -0700, wrote: I am creating a form and I would like the current date (the day the user works on the form) to be the default, but I need the user to have the option to type over that date if necessary. I am sure this is a simple option, but I can't seem to find the right way to insert the current date as the date field default option. Please help! Thanks Place the following macro in the template for your form (http://www.gmayor.com/installing_macro.htm) and change the form name in quotes to the name of the actual field in your template. Sub AutoNew() ActiveDocument.FormFields("DateField").Result = CStr(Now) End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ:http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I want a form field to figure a date based on the letter date. | Microsoft Word Help | |||
Field codes - current date +90d | Microsoft Word Help | |||
Fillin field default to current date | Mailmerge | |||
How can a user change the default date in a form field? | Tables | |||
How to insert future date based on current date plus 14 days | Microsoft Word Help |