Microsoft Office Tutorials and References
In Depth Information
Using Calendar Wizard
Set lastRow = tbl.Rows(tbl.Rows.Count)¶
'Set basic font and font size for table¶
rng.Font.name = "Arial"¶
rng.Font.Size = 9¶
With tbl¶
'Shade every second row light gray¶
For counter = 2 To tbl.Rows.Count Step 2¶
.Rows(counter).Shading.Texture = wdTextureNone¶
.Rows(counter).Shading.BackgroundPatternColor _¶
= wdColorGray10¶
Next counter¶
'Put double borders around the outside¶
.Borders.OutsideLineStyle = wdLineStyleDouble¶
'And single borders around the cells in the table¶
.Borders.InsideLineStyle = wdLineStyleSingle¶
'First row contains names of days of week¶
With .Rows(1)¶
'Shade dark gray with large, white text¶
.Shading.BackgroundPatternColor = wdColorGray70¶
.Range.Font.Size = 16¶
.Range.Font.Color = wdColorWhite¶
'Center text vertically¶
'Since Word97 doesn't support vertical¶
'cell alignment, calculate it¶
.Range.ParagraphFormat.SpaceBefore = _¶
(.Height - 16) / 2¶
'First row smaller so everything fits on the page¶
.Height = .Height - 10¶
End With¶
'Last cell contains name of month and year¶
'Dark gray with very large, white, bold text¶
With lastRow.Cells(lastRow.Cells.Count)¶
.Range.Font.Size = 24¶
.Range.Font.Bold = True¶
.Range.Font.Color = wdColorWhite¶
.Range.ParagraphFormat.Alignment = wdAlignParagraphRight¶
.Range.ParagraphFormat.SpaceBefore = _¶
(.Height - 24) / 2¶
.Shading.BackgroundPatternColor = wdColorGray70¶
End With¶
End With¶
End Sub¶
' * * * * *¶
Sub SetViewOptions(doc As Word.Document)¶
'Suppress second page by reducing¶
'font size of last paragraph mark¶
doc.Paragraphs.Last.Range.Font.Size = 1¶
'Show whole page on screen¶
doc.ActiveWindow.Panes(1).Zooms(3).PageFit _¶
= wdPageFitFullPage¶
Wrd
Search JabSto ::




Custom Search