明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1023|回复: 0

解决excel 页眉被遮挡问题

[复制链接]
发表于 2021-6-25 10:52 | 显示全部楼层 |阅读模式
Sub 宏2()
'
' 宏2 宏
'

'

    Application.PrintCommunication = True

    Application.PrintCommunication = False
    With ActiveSheet.PageSetup

        .PrintHeadings = False '
        .PrintGridlines = False '
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = True
        .CenterVertically = False '
        .Orientation = xlLandscape
        .Draft = False '
        .PaperSize = xlPaperA3
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = True '
        .Zoom = 100
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False '
        .DifferentFirstPageHeaderFooter = False '
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""

        .FirstPage.RightFooter.Text = ""
    End With
    Application.PrintCommunication = True
End Sub


您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-4 23:23 , Processed in 0.347514 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表