Application.PrintCommunication = False
With ActiveSheet.PageSetup
.CenterHeader = "&F" '页眉中设置为:文件名
.RightHeader = "" '页眉右设置为:空
.LeftFooter = "&B 机密 &B" '页脚左设置为:加粗的 机密两个字
.CenterFooter = "&D" '页脚中设置为:当前日期
.RightFooter = " 第 &P 页" '页脚右设置为:页码
End With
Application.PrintCommunication = True
End Sub
Sub setPageFont()Application.PrintCommunication = FalseWith ActiveSheet.PageSetup.LeftHeader = ""'页眉左设置为:空.CenterHeader = "&F"'页眉中设置为:文件名.RightHeader = "" '页眉右设置为:空.LeftFooter = "&B 机密 &B" '页脚左设置为:加粗的 机密两个字.CenterFooter = "&D"'页脚中设置为:当前日期.RightFooter = " 第 &P 页" '页脚右设置为:页码End WithApplication.PrintCommunication = TrueEnd Sub欢迎分享,转载请注明来源:内存溢出
评论列表(0条)