Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert String to Function Reference ViestaWu Excel Worksheet Functions 1 November 27th 07 06:58 AM
Function to convert Time String to Time Andibevan Excel Worksheet Functions 6 August 19th 05 01:19 PM
I cannot share my printer. Andrew Lo New Users to Excel 1 June 22nd 05 02:38 PM
Is there a function to convert a string representing an integer i. perin Excel Programming 1 October 6th 04 09:36 PM
Function to convert string Carl Brehm Excel Programming 13 July 19th 04 11:27 AM


All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"