1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| Sub 附注页面(control As IRibbonControl) With ActiveDocument.PageSetup .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(2.54) .BottomMargin = CentimetersToPoints(2.54) .LeftMargin = CentimetersToPoints(3.17) .RightMargin = CentimetersToPoints(2.7) .HeaderDistance = CentimetersToPoints(1.5) .FooterDistance = CentimetersToPoints(1.75) End With End Sub Sub 封面页面(control As IRibbonControl) With ActiveDocument.PageSetup .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(6.06) .BottomMargin = CentimetersToPoints(2.54) .LeftMargin = CentimetersToPoints(2.24) .RightMargin = CentimetersToPoints(2.27) .HeaderDistance = CentimetersToPoints(1.5) .FooterDistance = CentimetersToPoints(1.75) End With End Sub Sub 正文页面(control As IRibbonControl) With ActiveDocument.PageSetup .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(5) .BottomMargin = CentimetersToPoints(2) .LeftMargin = CentimetersToPoints(3) .RightMargin = CentimetersToPoints(3) .HeaderDistance = CentimetersToPoints(1.5) .FooterDistance = CentimetersToPoints(1.75) End With End Sub Sub 插入横页(control As IRibbonControl) Selection.InsertBreak Type:=wdSectionBreakNextPage Selection.InsertBreak Type:=wdSectionBreakNextPage Selection.GoTo What:=wdGoToPage, Which:=wdGoToPrevious, Count:=1, Name:="" Selection.Find.ClearFormatting With Selection.Find .Text = " " .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = True .CorrectHangulEndings = True .HanjaPhoneticHangul = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With If Selection.PageSetup.Orientation = wdOrientPortrait Then Selection.PageSetup.Orientation = wdOrientLandscape Else Selection.PageSetup.Orientation = wdOrientPortrait End If End Sub Sub 插入页码(control As IRibbonControl) Application.ScreenUpdating = False ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).PageNumbers.Add PageNumberAlignment:=wdAlignPageNumberCenter, FirstPage:=True With ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary) .Range.Font.Size = 9 .Range.Font.Name = "宋体" .Range.Collapse Direction:=wdCollapseEnd End With With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range .Delete .ParagraphFormat.Borders(wdBorderBottom).LineStyle = wdLineStyleNone End With Application.ScreenUpdating = True End Sub
|