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 .
|Published (Last):||4 December 2017|
|PDF File Size:||19.78 Mb|
|ePub File Size:||3.13 Mb|
|Price:||Free* [*Free Regsitration Required]|
Entia non sunt multiplicanda sine necessitate.
Login or Sign Up. I expected that this would do it: 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? Thanks for the suggestion, it works ok on my pc, but unfortunately I am having a couple of problems.
August 05, ‘ Authoer: I have 32 bit Windows Activeprintee code that gets the device names and works well locally, but needs additional work for network printers. Please post data in proper tables – I suggest this tool. I almost decided to hard code the string for the above mentioned languages when I realized that the solution is already there.
Last edited by RoryA; Sep 11th, at ActivePrinter to your default printer, in my case usually a Laserjet.
Please use [code] tags when posting code. When they start tele commuting, then it’s gonna get really ugly –Paul It’s important in life to always strike a happy medium, so activeprintrr you see someone with a crystal ball, and a smile on their face Hello Andy, You’re welcome.
Setting Printer and .PrintForm
Return to top of page. ActivePrinter ‘ do something with the temp printer Application. StdRegProv” ‘ get the Devices from the registry regobj. Returns and array of printer names and port numbers on the user’s computer.
Unfortunately it is not obvious to create a list of all possible port names. Changing the active printer in a macro Probably it would be: Thanks Paul, I would do that if I knew how to!! Dialogs xlDialogPrinterSetup and ask the user to select the printer.
All three errored me out. Activeprinter in Word en Powerpoint.
I have added them for you here; please be mindful in the future. Network Printer Thanks shg Resources saved on this page: Thanks for your help! Students Activeprintfr Here Join Us!
Application.ActivePrinter property (Excel)
Once you find the printer name and it’s port you can change it using the method WBD posted. Add a new VBA Module to workbook and paste the code below into it. Share it with others Like this thread? Run the macro “ShowPrintersAndPorts”. In case you haven’t guessed, I’m quite new to VBA!
How to set Excel’s ActivePrinter using VBA? •
Help Contact Us Go to top. This is the code to test the function: Configure the printer ports in Windows. I expected that this would do it:. Changing the active printer in a macro Hello andy, You will need a little more information to set activepronter ActivePrinter. In particular there is a localization issue.
Leith Ross ‘ Summary: Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.