Getting collection of Printers

Getting collection of Printers

Anonymous
Not applicable
197 Views
3 Replies
Message 1 of 4

Getting collection of Printers

Anonymous
Not applicable
How do I get a collection of Printers that are on a specified network share? For example, I have a network share named "\\MySrv\". How do I get get a list of all printers tied into "\\MySrv\"? Any help would be appreciated. Thanks. Joshua Modglin
0 Likes
198 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
For all things VB that aren't related to AutoCAD, always visit
this site first:

http://www.mvps.org/vbnet

--
Good judgment comes from experience.
Experience comes from bad judgment.

http://www.acadx.com


"jmodglin" wrote in message
news:f0a5a1d.-1@WebX.maYIadrTaRb...
How do I get a collection of Printers that are on a specified
network share? For example, I have a network share named
"\\MySrv\". How do I get get a list of all printers tied into
"\\MySrv\"? Any help would be appreciated. Thanks. Joshua Modglin
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks Frank but all I could find was a complex (to me) way of getting only the Windows System printers. Besides that all the functions were written in VB, isn't that different from VBA? If I was better at VBA I probably could figure out from looking at VB how to do it in VBA but I am still a beginner. Any other thoughts? What I will probably do is pull all that info from VLisp and send it to VBA. Unless you can help me be able to read the registry from VBA??! Thanks for all the help you and your guys (AcadX) has offered. It has usually been concise and exactly what I was looking for. Joshua Modglin
0 Likes
Message 4 of 4

Anonymous
Not applicable
Joshua:
Converting VB code to VBA is relativly easy. In VB there is no built
in ThisDrawing object. So... if you look at the VB code you'll see a
variable being set to the Acad application object, and possibly one
being set to the ActiveDocument object. Make note of the variable's name
and everytime you see it in the code, just replace it with Thisdrawing.
Get it?
Just a tickler on the net printers, if you place a drive list on a
form, if ya get it working right, it will see mapped drives on the
network. You could probaly use it to find out where they live and go and
ask each one if he has a printer.

jmodglin wrote:

> Thanks Frank but all I could find was a complex (to me) way of getting
> only the Windows System printers. Besides that all the functions were
> written in VB, isn't that different from VBA? If I was better at VBA I
> probably could figure out from looking at VB how to do it in VBA but I
> am still a beginner. Any other thoughts? What I will probably do is
> pull all that info from VLisp and send it to VBA. Unless you can help
> me be able to read the registry from VBA??! Thanks for all the help
> you and your guys (AcadX) has offered. It has usually been concise and
> exactly what I was looking for. Joshua Modglin
0 Likes