printing to a network printer

June 17, 2012 at 22:52:21
Specs: Windows 7
hi all,
i am trying to create a macro to enable my workbook to print pages to a colour printer on the network. i have no issues printing to the default printer which is black and white but not having much luck in getting the colour set up.
this is what i have at the moment
Sub Print_Page()
' Print_Page Macro

Application.ActivePrinter = "P-7401-COLOUR on S-VM-PRT01"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"P-7401-COLOUR on S-VM-PRT01:", Collate:=True

End Sub

See More: printing to a network printer

Report •

June 18, 2012 at 06:49:07
First, a posting tip...

Before posting any more code in this forum, please click on the blue line at the end of this post and read the instructions found via that link.

Second, it might help if you told us what you mean by "not having much luck in getting the colour set up".

Are you getting an error from Excel/VBA when you run the macro or an error from the printer or is nothing be printed with no error or something else?

Since we don't have the same printer or network as you, we can't test your code, so you need to give us some information to work with.

The one thing I noticed is that you do not have a colon on this line:

Application.ActivePrinter = "P-7401-COLOUR on S-VM-PRT01"

If I try that line using my printer and leaving off the colon, VBA throws up an error. Of course, not knowing what your specific issue is, I don't know if that's your problem.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question