老师好! 按你所教方法录制了一个宏,运行提示如图1,不知什么原因?
Sub Macro1() ' Macro1 Macro ' 宏在 2021-11-2 由 Windows用户 录制 If ActiveWindow.View.SplitSpecial <>wdPaneNone Then ActiveWindow.Panes(2).Close End If If ActiveWindow.ActivePane.View.Type =wdNormalView Or ActiveWindow. _ ActivePane.View.Type = wdOutlineViewThen ActiveWindow.ActivePane.View.Type =wdPrintView End If ActiveWindow.ActivePane.View.SeekView =wdSeekCurrentPageHeader With Selection.PageSetup .LineNumbering.Active = False .Orientation =wdOrientPortrait .TopMargin = CentimetersToPoints(2.8) .BottomMargin =CentimetersToPoints(1.38) .LeftMargin = CentimetersToPoints(3.01) .RightMargin =CentimetersToPoints(2.91) .Gutter = CentimetersToPoints(0) .HeaderDistance =CentimetersToPoints(0) .FooterDistance =CentimetersToPoints(0) .PageWidth = CentimetersToPoints(21) .PageHeight = CentimetersToPoints(29.7) .FirstPageTray = wdPrinterDefaultBin .OtherPagesTray = wdPrinterDefaultBin .SectionStart = wdSectionContinuous .OddAndEvenPagesHeaderFooter = True .DifferentFirstPageHeaderFooter = False .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = True .MirrorMargins = False .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft .LayoutMode = wdLayoutModeDefault EndWith ActiveWindow.ActivePane.View.SeekView =wdSeekMainDocument End Sub
|