Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Printer API

Author  Topic 

Hyukevain
Yak Posting Veteran

66 Posts

Posted - 2004-11-07 : 11:35:35
Hai,

Can I have some example about Printer API ? I need an API to detect all printer name that connected to my computer. I've tried to use this code to get it :

Dim objPrinter As VB.Printer
For Each objPrinter In VB.Printers
MsgBox objPrinter.DeviceName
Next

In VB, this code worked very well, but when I tried to run this code in Access (ADP Project) my application hang and closed unexpectedly.

From this case, I thing the problem is that Access have some incompatibility issue when run an VB library. Can anybody tell me about an API to subtitude this kind of function ? Or is there any other way to retrieve all printer name in my computer without using above code ?

Any suggestion will be appriciate. Thank you.

Regards,

Mike

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2004-11-12 : 11:38:36
does this help at all...............

http://www.mentalis.org/apilist/EnumPrinters.shtml


====
Paul
Go to Top of Page
   

- Advertisement -