I am programming a contract to be completed using a fill in form in Word 2k3.
I have inserted 3 calendars using the Calendar Control OCX and now I need to
know how to reference them. What is the script needed within the onclick sub?
I also need to reference one of them in the form ____day of 2004, is this
possible?
This is the script I have so far...it's the code for the button Next>> to
post the data to the form..
Private Sub BuInfoOK_Click()
vContractNum = ContractInfo.ContractNum.Text
vSubName = ContractInfo.SubName.Text
vSubAdd1 = ContractInfo.SubAdd1.Text
vSubAdd2 = ContractInfo.SubAdd2.Text
vSubCSZ = ContractInfo.SubCSZ.Text
vSubPhone = ContractInfo.SubPhone.Text
vSubFax = ContractInfo.SubFax.Text
vContractDate = ContractInfo.ContractDate.Value
vSubContractDate = ContractInfo.SubContractDate.Value
vCompletionDate = ContractInfo.CompletionDate.Value
pToggleProtectDoc
ActiveDocument.Bookmarks("bkContractNum").Range.Text = vContractNum
ActiveDocument.Bookmarks("bkSubName").Range.Text = vSubName
ActiveDocument.Bookmarks("bkSubAdd1").Range.Text = vSubAdd1
ActiveDocument.Bookmarks("bkSubAdd2").Range.Text = vSubAdd2
ActiveDocument.Bookmarks("bkSubCSZ").Range.Text = vSubCSZ
ActiveDocument.Bookmarks("bkSubPhone").Range.Text = vSubPhone
ActiveDocument.Bookmarks("bkSubFax").Range.Text = vSubFax
ActiveDocument.Bookmarks("bkSubContractDate").Range.Text = vSubContractDate
pToggleProtectDoc
ContractInfo.Hide
Categories.Show
End Sub
Sub pToggleProtectDoc()
Set Doc = ActiveDocument
If Doc.ProtectionType = wdNoProtection Then
Doc.Protect Password:="xxxx", NoReset:=True, Type:=wdAllowOnlyFormFields
Else
Doc.Unprotect Password:="xxxx"
End If
End Sub
Private Sub ContractDate_Click()
?????????
End Sub
What is the called reference at ?????????
How do I refence and call out the date in the first sub?
Joost Verdaasdonk - 05 Nov 2004 23:44 GMT
Hi,
Check out:
http://www.fontstuff.com/word/wordtut03a.htm
Groetjes,
Joost Verdaasdonk