Microsoft Office Tutorials and References
In Depth Information
Formatting Your Calendar
'Go to top of doc¶
Selection.HomeKey wdStory¶
'Protect so form fields can be used¶
doc.Protect Type:=wdAllowOnlyFormFields¶
'Suppress field shading so that it doesn't print¶
'And make sure bookmarks are displayed so that¶
'user can see the fields¶
doc.FormFields.Shaded = False¶
doc.ActiveWindow.View.ShowBookmarks = True¶
End Sub¶
Formatting Your Calendar
Wrd
Changing the Page Settings
You can change the page formatting if you desire a different paper size or
different margins.
Adjust the margin settings, paper size, etc., for the calendar sheet in the block
of code beginning With doc.PageSetup in the procedure 'CreateCalendar'.
Note that margin settings must be in points. The value used by 'In1_4'
(representing 1/4 inch) is generated using the 'InchesToPoints' function
provided by Word's object model. To change this value, either type the values
for the margins in directly or change the value assignment in the line In1_4 =
InchesToPoints(0.25).
With the default settings, the first row is formatted dark gray and every second
row light gray. The text is formatted white in the dark gray regions; black
otherwise. This formatting is applied by the procedure 'FormatCalendar' and
can be adjusted as follows:
Changing the Font
Change the font and font size for the entire calendar by assigning the desired
values to these code lines:
rng.Font.name = "Arial"¶
rng.Font.Size = 9¶
The alternate row shading can be changed by substituting the value for
Rows(counter).Shading.BackgroundPatternColor = wdColorGray10.
 
Search JabSto ::




Custom Search