Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Lilbit Lilbit is offline
external usenet poster
 
Posts: 12
Default Setting Dates in Editable Form Fields In a Protected Form

#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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Setting Dates in Editable Form Fields In a Protected Form

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   Report Post  
Posted to microsoft.public.word.docmanagement
Lilbit Lilbit is offline
external usenet poster
 
Posts: 12
Default Setting Dates in Editable Form Fields In a Protected Form

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   Report Post  
Posted to microsoft.public.word.docmanagement
Lilbit Lilbit is offline
external usenet poster
 
Posts: 12
Default Setting Dates in Editable Form Fields In a Protected Form

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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Setting Dates in Editable Form Fields In a Protected Form

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a order form with the titles locked and fields editable? tranquilangel Tables 1 June 2nd 06 04:44 AM
protected fields on a form Bridie Microsoft Word Help 1 May 11th 06 12:04 PM
Word doc/protected form and formatting dates ACQ Microsoft Word Help 2 January 27th 06 05:39 PM
Fields in a protected form Linda Microsoft Word Help 2 July 21st 05 12:40 AM
Retain editable images and allow text boxes in a form PW protected Shannon Microsoft Word Help 2 December 8th 04 03:37 PM


All times are GMT +1. The time now is 09:28 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"