我办公室的某些人使用Bluebeam程序打印,有些人使用默认的Adobe PDF打印。我有一个宏默认打印到Bluebeam,而On Error GoTo
用于Adobe,但它似乎无法正常工作。
我还试过On Error Goto
... SendKeys "^{F2}"
Sub PrintPDF()
Application.ScreenUpdating = False
Dim filename As String
On Error GoTo whoa
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, ActivePrinter:="Bluebeam PDF"
filename = Range("B2").Value
Exit Sub
whoa:
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, ActivePrinter:="Adobe PDF"
Application.ScreenUpdating = True
End Sub