I have an application where I'm running code from a users' interaction with a user form. User clicks "run", a report is built, and then printed automatically using the .PrintOut method.

As far as default/ActivePrinter goes, I'm finding that a number of users have one of two problematic things going on:

1.) user has set a .pdf printer or Microsoft XPS Document Writer as their default printer

2.) user has a network printer incorrectly setup, causing printing problems (one user had a network printer as default that has ActivePrinter returning "PRINTER" on "PRINTER" instead of \\Server\PRINTER on NeXX)



I'm trying to separate when ActivePrinter is a real printer and only print if that is true. I can easily use the EnumPrinters API to separate out the correctly setup network printers ( using PRINTER_ENUM_CONNECTIONS = &H4 ) but that leaves out the few users that have a local printer connected to their computer.



Any ideas? Is this making sense?


I have been trying to find definitions to the Printer Attributes that the EnumPrinters API returns, but have exhaustively searched and found nothing useful. For instance, if I run EnumPrinters on my workstation and print out the printer names and the attributes, I get: (attribute values are in Hex)

Printer: \\NFIL401\Charger                     Attributes: 10
Printer: \\nfil401\Gopher                      Attributes: 10
Printer: \\NFIL401\Husky                      Attributes: 10
Printer: \\Nfil401\Money                       Attributes: 10
Printer: \\Nfil401\SC_Eng                      Attributes: 10
Printer: \\NFIL401\Steelhead                 Attributes: 10
Printer: \\NFIL401\Viking                       Attributes: 10
Printer: \\NFIL401\Wild                         Attributes: 10
Printer: \\NFIL401\Zorro                        Attributes: 10
Printer: Steelhead                                Attributes: 640
Printer: Microsoft XPS Document Writer          Attributes: 40
Printer: CutePDF Writer                         Attributes: 240
My company has a practice of naming printers with odd names that have nothing to do with their location, which is really annoying, but off topic. It should really be a systematic syntax. Also; the last reference to Steelhead is a network printer that some how is installed wrong. ActivePrinter would return "Stealhead on Stealhead" on this printer is default.

Anyway; I know what 10 (network) and 40 (local) mean. I can't for the life of me find what 640 or 240 mean. I'm hoping that these attribute values can help me pin point when ActivePrinter is a real printer. Or maybe they won't.


Any other methods/suggestions are welcome for determining what is a traditional printer. Thanks!