Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Calendar OCX Controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Staceman - 03 Nov 2004 18:42 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.