WORD中VBA插入页码
Sub 插入页码() With ActiveWindow.ActivePane.View .SeekView = wdSeekCurrentPageFooter With Selection .Expand wdStory .ParagraphFormat.Alignment = wdAlignParagraphCenter .TypeText "第" .Fields.Add .Range, wdFieldPage .TypeText "页/共"
Sub 插入页码() With ActiveWindow.ActivePane.View .SeekView = wdSeekCurrentPageFooter With Selection .Expand wdStory .ParagraphFormat.Alignment = wdAlignParagraphCenter .TypeText "第" .Fields.Add .Range, wdFieldPage .TypeText "页/共"