Instruction
1
Create a Word document and save it as a template. To do this, use the corresponding menu items "File" (for Office 2007 and above Microsoft Office button in the upper left corner) - "New" - "Blank document" and then "Save as "Word Template".
2
Open the programming environment Visual Basic by pressing Alt and F11. Opens an editor window where you press "F7".
3
At the top of the window, select "Insert" - "User Form" ("Insert "Custom shape"). Select the "Tools" menu - "Additional Controls". In the pop-menu, put a tick near the item "Calendar control" (or "Calendar Control). Click "OK".
4
Click on the icon "Calendar" in the control panel Toolbox. Move the mouse pointer over the form and draw a square necessary for the calendar size.
5
You can change the display settings of the calendar. To do this, in the left part of the window, click Properties, select "Custom" and click on the ellipsis button on the right side of the row. The window that POPs up select the appropriate settings. In the tab "Font" and "Color" you can select settings for the calendar bar. After making all settings, click "OK".
6
Click on the form header and in the "Properties" (row "Caption") can specify the name of the Calendar. The title will change.
7
To organise the closing of the calendar by pressing "Esc". To do this, click the ToolBox button "CommandButton", draw it. The value in the Cancel button in the "Properties", change to "True". Press F7, enter between the two words "Private Sub.." and "End Sub" line "Unload Me", and then click OK.
8
To display the current date in the calendar insert the code after the item "Private Sub Calendar1_Click()":Private Sub UserForm_Initialize()
Calendar1.Today
End Sub
9
To see the calendar displayed in any document created on a template, click "Insert" - "Module", and type:Sub OpenCalendar()
UserForm1.Show
End Sub
10
Click the "Save" button on the toolbar (or "File" - "Save"). Can close the editor.
11
To verify, press Alt + F8 in Word. Enter "OpenCalendar", click "Run". Opens the calendar. Save the created template.