1 任务描述
给当前Excel表自动设置页边距、页眉页脚。
2 过程代码
Sub Excel设置页眉页脚()
'
With Ac
.LeftMargin = A)
.RightMargin = A)
.TopMargin = A)
.BottomMargin = A)
.HeaderMargin = A)
.FooterMargin = A)
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
With Ac
.LeftHeader = ""
.CenterHeader = "&A"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = "&P/&N"
End With
Ac
End Sub
3 过程运行效果