Forums New posts Search forums. What's new New posts New Excel articles Latest activity. New posts. Excel Articles Latest reviews Search Excel articles.

Author:Vudosar Aragor
Language:English (Spanish)
Genre:Health and Food
Published (Last):10 January 2015
PDF File Size:14.62 Mb
ePub File Size:9.98 Mb
Price:Free* [*Free Regsitration Required]

Forums New posts Search forums. What's new New posts New Excel articles Latest activity. New posts. Excel Articles Latest reviews Search Excel articles. Log in Register. Search titles only. Search Advanced search….

Search forums. Log in. If you forgot your password, you can reset your password. JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding. Changing the active printer in a macro.

Thread starter andy Start date Sep 7, Tags. Joined Oct 20, Messages I have a macro that I use to change the fill color of cells, hide and unhide columns, and print 1 copy of each worksheet in the file. However, I need to manually select the printer and close out of the 'print' screen before I activate it.

Otherwise, it will try to print from the other connected printer. Is there a line I can add to the macro to select the correct printer so I can JUST activate it without having to sidetrack?

Select Columns "I:I". Select Selection. Select With Selection. Select Columns "F:F". Select Columns "J:J". Select ActiveWindow. Last edited by a moderator: Sep 11, Some videos you may like. Excel Facts. Format cells as currency. Click here to reveal answer.

Joined Jun 2, Messages 3, There's a property of the Application object called ActivePrinter. You could just set that if you know the name of the printer: Code:. Leith Ross Well-known Member.

Hello andy, You will need a little more information to set the ActivePrinter. You need to know the printer's name and the port it uses. Add a new VBA Module to workbook and paste the code below into it. Run the macro "ShowPrintersAndPorts". This will display a list of printers and faxes for the local computer. Once you find the printer name and it's port you can change it using the method WBD posted. The port used is USB Do I make the code line application. Probably it would be: Code:.

Alright, I tried the full string, and just the printer name, and the port. All three errored me out. Do I need to define a variable first? Hello andy, You need to include the colon ":" at the end of the string Last edited: Sep 11, Any other thoughts? Leith Ross - When you said I needed the printer name and port, I accessed the devices and printers instead of running the macro, and when I saw on USB, it stood to reason that that was the port.

I ran the macro just now, and it gave a completely different port. Replacing USB with that solved the issue. Thanks for your help! Hello Andy, You're welcome. Glad you have everything working now. You must log in or register to reply here. Watch MrExcel Video. Forum statistics Threads 1,, Messages 5,, Members , Latest member deanro. Date and reference number being inserted into footer after the first page Started by dpaton05 Sunday at PM Replies: Calculating lost hours per week Started by gd6noob May 29, Replies: VBA Open.

Invalid qualifier Started by dpaton05 May 26, Replies:


Application.ActivePrinter property (Excel)

Log In. Steve Fairclough I. Manager RE: Application. ActivePrinter port name in Excel??? Configure the printer ports on each machine to have the same configuration for the Win2PDF printer Just a thought --Paul It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face


Subscribe to RSS

Please Note: This article is written for users of the following Microsoft Word versions: , , , and If you are using an earlier version Word or earlier , this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Temporarily Changing the Printer in a Macro. Shaune has written a macro that prints, to a PDF writer, product information sheets. When he prints to the PDF writer, the macro resets the default printer for the system on which it is running, so that when someone then tries to print regularly after the macro is finished , Word still assumes the user wants to print to the PDF writer. Shaune is looking for a way for his macro to use the PDF writer temporarily, without resetting the default printer. The bad news, Shaune, is that you cannot get around resetting the printer.

Related Articles