|
-
Aug 20th, 2003, 12:59 PM
#1
Thread Starter
Addicted Member
Infomation on Printers from Excel 2000 SR-1
I am working on a spreadsheet that needs to be printed to a specific printer on our network.
This spreadsheet will be used by several different users from their own workstations.
Here is the print code so far:
Sub PrintToACCPrinter()
Dim strOldPrinter As String
strOldPrinter = Application.ActivePrinter
Application.ActivePrinter = "\\STLPS001\ACC033LJ4050 on Ne01:"
ActiveWindow.SelectedSheets.PrintOut
Application.ActivePrinter = strOldPrinter
End Sub
The problem is that the ActivePrinter object requires the Portname to be part of the string and printer port changes between workstations.
So my question is this:
How do you derive the port for a printer using VBA in Excel?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|