标题:excel中,怎么用宏批量处理页面设置
取消只看楼主
快乐12
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-8-14
 问题点数:0 回复次数:0 
excel中,怎么用宏批量处理页面设置
Sub Macro1()
'
' Macro1 Macro
' 宏由 微软用户 录制,时间: 2010-8-14
'
' 快捷键: Ctrl+z
'
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(2.3)
        .RightMargin = Application.InchesToPoints(2.3)
        .TopMargin = Application.InchesToPoints(2.3)
        .BottomMargin = Application.InchesToPoints(2.3)
        .HeaderMargin = Application.InchesToPoints(2.1)
        .FooterMargin = Application.InchesToPoints(2.1)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = 100
        .PrintErrors = xlPrintErrorsDisplayed
    End With
    ActiveWindow.SelectedSheets.PrintPreview
    ActiveWorkbook.Save
End Sub
这个只能单个进行处理页面设置,怎么才能批量
进行处理页面设置
搜索更多相关主题的帖子: 页面 批量处理 excel 
2010-08-14 16:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-315690-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.187483 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved