View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default 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