I am trying to send the form to a printer other than the default printer using: Printer = “HP LaserJet Series PCL on LPT4:”. There’s a property of the Application object called ActivePrinter. You could just You will need a little more information to set the ActivePrinter. The Printer property needs to be changed in the registry code in order to print from a different printer other than the default printer. If we need to .

Author: Nitilar Kigrel
Country: Dominica
Language: English (Spanish)
Genre: Life
Published (Last): 27 February 2013
Pages: 311
PDF File Size: 3.71 Mb
ePub File Size: 2.13 Mb
ISBN: 298-4-78988-401-7
Downloads: 97542
Price: Free* [*Free Regsitration Required]
Uploader: Mezitaxe

I ran the macro just now, and it gave a completely different port. Last edited by RoryA; Sep 11th, at You need to know the printer’s name and the port it uses. All contents Activepronter by MrExcel Publishing.


All three errored me out. Login or Sign Up.

Changing the active printer in a macro Hello andy, You will need a little more information to set the ActivePrinter. I expected that this would do it:.

  EN 1677-4 PDF

Run the macro “ShowPrintersAndPorts”. Probably it would be: Close this window and log in. Hello Andy, You’re welcome. Thank you Fran Bus.

Excel on Windows Error in line: I agreed to these rules. August 05, ‘ Authoer: Changing the active xpplication in a macro Hello andy, You need to include the colon “: Leith Ross ‘ Summary: ActivePrinter in the immediate window and got as reply: At startup Excel will set Application. Unfortunately it is not obvious to create a list of all possible port names.

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Changing the active printer in a macro Probably it would be: ActivePrinter port name in Excel??? Hello I am having trouble printing a page to both a local printer which works fine and a network printer which does not work Both printers are installed on the Computers.

All times are GMT Otherwise, it will try to print from the other connected printer. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Network Printer ‘ActivePrinter’ of object’_Application’ failed – Free Excel\VBA Help Forum

How to get the port of a printer? However, I need to manually select the printer and close out of the ‘print’ screen before I activate it. Please post data in proper tables – I suggest this tool. Activeprinter in Word en Powerpoint.


I have added them for you here; please be mindful in the future. Exit Function Do Start: Do I make the code line application. Please use [code] tags when posting code. We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity.

Network Printer Does the Ne Exit Do Case Else: Changing the active printer in a macro Alright, I tried the full string, and just the printer name, and applicatkon port.