Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
function to convert Printer share name to ActivePrinter string
I'm trying to figure out a way to convert the sharename of a network printer
to the format that ActivePrinter.PrintOut needs so I can specify which printer to use. I've recored changing to the printer in question and it shows up as "HP LaserJet 4050 series PCL6 on Ne05:" but I have no idea how to determine this programatically. I'd much rather just specify the UNC path and printer sharename. I found this http://tinyurl.com/2ovpms function that does it for 2k+, but I still need it to work under 97 for a few months. Any suggestions appreciated. TIA Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
function to convert Printer share name to ActivePrinter string
Matt,
It appears that keepItcool's code will not work in XL97 because of his use of the Split function. You could try replacing the Split function with Tom Ogilvy's Split97 function that works in XL97... Function Split97(sStr As String, sDelim As String) As Variant Split97 = Evaluate("{""" & Application.Substitute(sStr, sDelim, """,""") & """}") End Function I have not tried/tested my suggestion, so you are on your own. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Matt Williamson" wrote in message I'm trying to figure out a way to convert the sharename of a network printer to the format that ActivePrinter.PrintOut needs so I can specify which printer to use. I've recored changing to the printer in question and it shows up as "HP LaserJet 4050 series PCL6 on Ne05:" but I have no idea how to determine this programatically. I'd much rather just specify the UNC path and printer sharename. I found this http://tinyurl.com/2ovpms function that does it for 2k+, but I still need it to work under 97 for a few months. Any suggestions appreciated. TIA Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert String to Function Reference | Excel Worksheet Functions | |||
Function to convert Time String to Time | Excel Worksheet Functions | |||
I cannot share my printer. | New Users to Excel | |||
Is there a function to convert a string representing an integer i. | Excel Programming | |||
Function to convert string | Excel Programming |