【发布时间】:2016-11-09 01:46:29
【问题描述】:
当通过宏打印 PDF 时,有没有办法控制其缩放百分比?我已将电子表格放大 100%,但 PDF 始终显示为 79.3%,而且很难看到。如果它放大到 200%,它在 PDF 上显示得非常好。我通常会忽略这方面,只是告诉用户放大,但这是给 CEO 的,你知道的。
这是我所拥有的:
Private Sub CommandButton1_Click()
Dim Sel_Manager As String
'Specify headers to be repeated at the top
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = "$5:$10"
.PrintTitleColumns = "$B:$M"
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
'Manager selection through simple Inputbox
Sel_Manager = ComboBox1
'Insert autofilter for worksheet
Cells.Select
Selection.AutoFilter
'Select manager defined in inputbox
ActiveSheet.Range("B10", Range("M10").End(xlDown)).AutoFilter Field:=1, Criteria1:=Sel_Manager
ActiveSheet.Range("B10", Range("M10").End(xlDown)).AutoFilter Field:=2, Criteria1:="A"
'Select range to be printed and specify manager in filename
ActiveSheet.Range("B10", Range("M10").End(xlDown)).Select
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
Sel_Manager + ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
ActiveSheet.ShowAllData
Application.PrintCommunication = True
End Sub
【问题讨论】: