Hi. I've been given the following task
Some of our "precious" docs will be saved in a shared folder on the
network. Only some people will have access to that folder. Those
people are supposed to print those docs, BUT ONLY IN COLOR - BW
printing should pe prevented. So... this is my problem.
Up to now (this morning) I have come up with some VB code to enumerate
through all attached (local and networked) printers and determine
(with DeviceCapabilities, DC_COLORDEVICE) their print capabilities.
Also, I have written in the documents themselves some VBA code which
in the event "DocumentBeforePrint" could check the above-mentioned
capabilities (right now it only asks "are you sure blah blah blah?").
Since I create these docs by code, I could easily add this VBA code
through extensibility (which, BTW, also creates the problem of users
disallowing word from running macros, and thus obtaining access to BW
printing....)
My problem is that the dialog of the printer driver (i.e. the printer
selection, the printer's proprieties, etc) is shown AFTER the
DocumentBeforePrint event, so therefore in DocumentBeforePrint I
cannot check
a. The selected printer
b. The selected printer's color caps
c. The selection in the printer's driver directly (the user might use
a color printer to print in BW, by clicking on the printers's
proprieties, then on the "Quality" tab, or whatever the tab for color/
BW selection might be for that specific printer).
So in other words the only thing I can do right now is to prevent
printing if NO visible printer has color caps. In all other situations
(another printer selected, changing of printer's print proprieties (by
the user), macros not allowed to run in the Word document, etc) I
cannot do a thing.
Is there a way I could do this ?
Thanks a lot, Alex.
Archived from group: microsoft>public>vb>winapi