Hello all,
I need Excel 2013 to print to a non-default printer, here is my code
Sub QuickChangePrinter()
Dim sNewPrinter As String
sNewPrinter = ActivePrinter
ActivePrinter = "[printer name]"
Application.PrintOut Filename:="[test print]"
ActivePrinter = sNewPrinter
End Sub
When I try to run the macro I get an error stating:
Run-time error '1004':
Method 'ActivePrinter' of object '_Global' failed
Everything I find online points to this model of code to do it, but for whatever reason I can't get it to run! any help would be amazing, thanks!
I need Excel 2013 to print to a non-default printer, here is my code
Sub QuickChangePrinter()
Dim sNewPrinter As String
sNewPrinter = ActivePrinter
ActivePrinter = "[printer name]"
Application.PrintOut Filename:="[test print]"
ActivePrinter = sNewPrinter
End Sub
When I try to run the macro I get an error stating:
Run-time error '1004':
Method 'ActivePrinter' of object '_Global' failed
Everything I find online points to this model of code to do it, but for whatever reason I can't get it to run! any help would be amazing, thanks!