Change Default Printer Code not Working

G

grayday

I'm trying to use the following code to change where my page prints.
want it to print to the fax, not my default printer.

Sub PrintToAnotherPrinter()
Dim STDprinter As String
STDprinter = Application.ActivePrinter
Application.ActivePrinter = "Office - Fax:"
' change printer
ActiveSheet.PrintOut
' prints the active sheet
Application.ActivePrinter = STDprinter
' change back to standard printer
End Sub

My fax printer is named Office - Fax. Is is right to refer to this i
here:
Application.ActivePrinter = "Office - Fax:"

Or do I need to use a manufacturers name or something different.
have tried all naming conventions I can think of but still get thi
error:

Run-Time error '1004':

Method 'Active Printer' of object '_Application' failed.

If anybody can help it would be greatly appreciated. Thanks
 
D

Dave Peterson

Record a macro when you change printers and you'll see the code.

And you have responses at your other post.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top