Selection.Tables(1).Cell(2, i).Shading.BackgroundPatternColor = wdColorYellow Next '生成日历 For i = 1 To intMonthDays Dim intRow As Integer Dim strDate As String intWeekDay = Weekday(InputYear & "-" & InputMonth & "-" & i) intRow = ((intFirstDayWeek + i - 2) \ 7 + 1) * 2 + 1 '计算行位置
Dim strTmp As String Dim lngColor As Long strTmp = Trim(GetDayString(CDate((InputYear & "-" & InputMonth & "-" & i)), lngColor)) Selection.Tables(1).Cell(intRow, intWeekDay).Select If intWeekDay = 1 Or intWeekDay = 7 Then Selection.Font.Color = wdColorRed ElseIf Left(strTmp, 1) = "*" Then Selection.Font.Color = wdColorRed strTmp = Replace(strTmp, "*", "") Else Selection.Font.Color = wdColorBlack End If Selection.Font.Size = 40 Selection.Font.Name = "Arial narrow" Selection.Font.Bold = True Selection.TypeText i Selection.TypeText Chr(11) If Len(strTmp) > 5 Then Selection.Font.Size = 8 Else Selection.Font.Size = 10 End If Selection.Font.Name = "宋体"
上一篇:新一代开源系统ubuntu,免费寄送光盘。
下一篇:17.2 Class members
|