ws.PageSetup.HeaderFooter = xlHeaderFooterNone
ws.PageSetup.PrintTitleRows = ""
ws.PageSetup.PrintTitleColumns = ""
ws.PageSetup.PrintArea = ""
ws.PageSetup.PrintComments = xlPrintNoComments
ws.PageSetup.PrintQuality = 600
ws.PageSetup.CenterHorizontally = False
ws.PageSetup.CenterVertically = False
ws.PageSetup.Orientation = xlPortrait
ws.PageSetup.Draft = False
ws.PageSetup.PaperSize = xlPaperA4
ws.PageSetup.FirstPageNumber = xlAutomatic
ws.PageSetup.Order = xlDownThenOver
ws.PageSetup.BlackAndWhite = False
ws.PageSetup.Zoom = False
ws.PageSetup.PrintErrors = xlPrintErrorsDisplayed
ws.PageSetup.PrintTitleRows = ""
ws.PageSetup.PrintTitleColumns = ""
ws.PageSetup.PrintArea = ""
ws.PageSetup.PrintComments = xlPrintNoComments
ws.PageSetup.PrintQuality = 600
ws.PageSetup.CenterHorizontally = False
ws.PageSetup.CenterVertically = False
ws.PageSetup.Orientation = xlPortrait
ws.PageSetup.Draft = False
ws.PageSetup.PaperSize = xlPaperA4
ws.PageSetup.FirstPageNumber = xlAutomatic
ws.PageSetup.Order = xlDownThenOver
ws.PageSetup.BlackAndWhite = False
ws.PageSetup.Zoom = False
ws.PageSetup.PrintErrors = xlPrintErrorsDisplayed
ws.PageSetup.PrintTitleRows = ""
ws.PageSetup.PrintTitleColumns = ""
ws.PageSetup.PrintArea = ""
ws.PageSetup.PrintComments = xlPrintNoComments
ws.PageSetup.PrintQuality = 600
ws.PageSetup.CenterHorizontally = False
ws.PageSetup.CenterVertically = False
ws.PageSetup.Orientation = xlPortrait
ws.PageSetup.Draft = False
ws.PageSetup.PaperSize = xlPaperA4
ws.PageSetup.FirstPageNumber = xlAutomatic
ws.PageSetup.Order = xlDownThenOver
ws.PageSetup.BlackAndWhite = False
ws.PageSetup.Zoom = False
ws.PageSetup.PrintErrors = xlPrintErrorsDisplayed
End If
Next
End Sub
④按下F5键执行宏
四、 注意事项
在复制页眉页脚时需要注意以下几点:
1.不同的工作表可能有不同的打印设置,所以需要把所有的设置都复制过来 。
2.复制页眉页脚时需要把“不同的第一页页眉页脚”和“偶数页页眉页脚”设置为true 。
3.如果需要复制页码,需要把“页脚”中的页码设置为“自动” 。
5. 如果粘贴时出现错误,可以尝试在“页面布局”中重新打开“页眉页脚”,然后关闭 。
猜你喜欢
- microsoft office excel加密的方法?
- 把excel导入手机通讯录的方法步骤?
- Excel中添加抬头的操作方法步骤?
- excel中的把打印线不让显示 删除的方法?
- excel中人民币货币符号输入方法及更改默认货币格式?
- excel2003隐藏行与列的方法?
- excel2003根据日期进行筛选的方法?
- 学习用Excel做数据分析之移动平均方法?
- 手腕关节疼痛怎么办呢
- 认识审计工作有哪一些重要性
