I have a printer named 'eCopy PaperWorks Printer' with the port showing as 'ECOPYPAPERWORKS' in the Print Preferences dialog box. What VBA code would I write if I wanted to print to this specific printer? Easy question, I know, but I'm new. Thanks.
I have a printer named 'eCopy PaperWorks Printer' with the port showing as 'ECOPYPAPERWORKS' in the Print Preferences dialog box. What VBA code would I write if I wanted to print to this specific printer? Easy question, I know, but I'm new. Thanks.
Have you tried recording a macro?
Entia non sunt multiplicanda sine necessitate
I'll give that a try. Normally when I've done that, it prints to the default printer.
OK, I created a macro selecting the eCopy printer and it created code that simply prints on the default printer. I need to specify a different printer for this task, not just the default. Thanks again.
Last edited by rkjudy; 05-25-2011 at 06:36 PM.
Still going to default printer.
Did you switch to the desired printer when you recorded the macro?
What did the macro record?
Last edited by shg; 05-25-2011 at 07:28 PM.
The macro recorded this:
Also I've tried this:Please Login or Register to view this content.
But it returns an error 'Method 'ActivePrinter of object_'Application' failedPlease Login or Register to view this content.
Any suggestions?
Hello rkjudy,
This script will tell you the name of the printer and the port it uses. You can then use the name matching your printer to change the printer using Application.ActivePrinter.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks