Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
#1) I need a form field to default to the current date, but I want the user
to be able to change it if they want. #2) I need a form field to default to 30 days from the current date, but I want the user to be able to change it if they want. Thanks in advance for your help!!! -- Message posted using http://www.talkaboutsoftware.com/gro...docmanagement/ More information at http://www.talkaboutsoftware.com/faq.html |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
If the field must be editable, you can only do this with macros, which
creates the problem of how you are going to ensure the users will allow the macros to run. Ideally you should save the form as a template and users would create new documents from it. In which case you can populate the date fields from an autonew macro e.g. Sub Autonew() Dim sDate As Date Dim fDate As Date Dim dDoc As Document Set dDoc = ActiveDocument sDate = Format(Date, "dd/MM/yy") fDate = Format((Date + 30), "dd/MM/yy") With dDoc .FormFields("Text1").Result = sDate .FormFields("Text2").Result = fDate .FormFields("Text1").Select End With End Sub The macro assumes the two date form fields are bookmarked Text1 and Text2. See also http://www.gmayor.com/popup_calendar.htm and http://www.gmayor.com/insert_a_date_...than_today.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Lilbit wrote: #1) I need a form field to default to the current date, but I want the user to be able to change it if they want. #2) I need a form field to default to 30 days from the current date, but I want the user to be able to change it if they want. Thanks in advance for your help!!! |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Thanks for your response. Can't quite get it to work by just inserting the
macro in the template. I'm assuming I have to read the documents you referred to and find what I'm missing. Thanks again!! -- Message posted using http://www.talkaboutsoftware.com/gro...docmanagement/ More information at http://www.talkaboutsoftware.com/faq.html |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Form field 11(Date1) for the current default date works fine. Form
field14(Date2) for the default current date+30 has the correct date, but it is not editable. Also, it seems to loop: Field11 (current default date)(editable) Field12 (next form field) Field13 (next form field) Field14 (default date(current+30days))(not editable) Field11 (current default date)(editable) If you could give me some ideas on how to correct this, it would be appreciated. Thanks!! -- Message posted using http://www.talkaboutsoftware.com/gro...docmanagement/ More information at http://www.talkaboutsoftware.com/faq.html |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Set the field types as date or text - not Current Date. The macro will
insert the current date and the calculated date in the fields indicated in the section .FormFields("Text11").Result = sDate .FormFields("Text14").Result = fDate |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a order form with the titles locked and fields editable? | Tables | |||
protected fields on a form | Microsoft Word Help | |||
Word doc/protected form and formatting dates | Microsoft Word Help | |||
Fields in a protected form | Microsoft Word Help | |||
Retain editable images and allow text boxes in a form PW protected | Microsoft Word Help |