Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings all
I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kieran,
What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nick,
Thanks for replying - my master plan was to write a function that would return a boolean (FALSE) if the users default printer was colour. Then set the ActiveSheet.PageSetup.BlackAndWhite property to the return value Perhaps not world domination but its a start! :) Kieran H NickHK wrote: Kieran, What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kieran,
It certainly should be possible to determine if a printer is BW only from one of the Printer_Info types. Just wondering if it is worth it. If you send a colour print job to a BW printer, doesn't the driver sort out the closest greyscale match ? Not sure of quality of output. Does this output (as above) differ much from setting BlackAndWhite to True and then printing ? NickHK "Kieran H" wrote in message oups.com... Nick, Thanks for replying - my master plan was to write a function that would return a boolean (FALSE) if the users default printer was colour. Then set the ActiveSheet.PageSetup.BlackAndWhite property to the return value Perhaps not world domination but its a start! :) Kieran H NickHK wrote: Kieran, What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kieran,
Looks like you will need the OpenPprinter, GetPrinter, ClosePrinter APIs with the PRINTER_INFO_2 and DEVMODE types, reading the value of dmColor (http://msdn.microsoft.com/library/en...sp?frame=true). This http://vb.mvps.org/samples/project.asp?id=PrnInfo gives the basics of the required code. But first decide if it is worth it. NickHK "NickHK" wrote in message ... Kieran, It certainly should be possible to determine if a printer is BW only from one of the Printer_Info types. Just wondering if it is worth it. If you send a colour print job to a BW printer, doesn't the driver sort out the closest greyscale match ? Not sure of quality of output. Does this output (as above) differ much from setting BlackAndWhite to True and then printing ? NickHK "Kieran H" wrote in message oups.com... Nick, Thanks for replying - my master plan was to write a function that would return a boolean (FALSE) if the users default printer was colour. Then set the ActiveSheet.PageSetup.BlackAndWhite property to the return value Perhaps not world domination but its a start! :) Kieran H NickHK wrote: Kieran, What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Kieran,
OK, I have a class that will determine the colour mode. Let me know if you want it. However, I'm not sure if it returns the correct answer for an old dot matrix printer that I have, all others (copier, fax, PDF, HP colour, HP black etc) it returns the correct result. NickHK "Kieran H" wrote in message oups.com... Nick, Thanks for replying - my master plan was to write a function that would return a boolean (FALSE) if the users default printer was colour. Then set the ActiveSheet.PageSetup.BlackAndWhite property to the return value Perhaps not world domination but its a start! :) Kieran H NickHK wrote: Kieran, What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nick,
Many thanks for your research, the class you described sounds exactly what I need. As for whether its worth it ?- It looks good on screen or printed in colour but looks crap if printed in bw (the grey is too dark) Poor code that still works may be criticised by my peers but with poor presentation eveyone's a critic! Thanks again Kieran NickHK wrote: Kieran, OK, I have a class that will determine the colour mode. Let me know if you want it. However, I'm not sure if it returns the correct answer for an old dot matrix printer that I have, all others (copier, fax, PDF, HP colour, HP black etc) it returns the correct result. NickHK "Kieran H" wrote in message oups.com... Nick, Thanks for replying - my master plan was to write a function that would return a boolean (FALSE) if the users default printer was colour. Then set the ActiveSheet.PageSetup.BlackAndWhite property to the return value Perhaps not world domination but its a start! :) Kieran H NickHK wrote: Kieran, What changes do you intend to make if the printer is B/W ? NickHK "Kieran H" egroups.com... Greetings all I have a number of programatically created reports that are tastefully coloured (I hope!) I am very happy for them to print on colour if the users default printer is colour. However if they have a BW printer I would like the report to print in BW How can I test for whether the default printer is colour or BW from within Excel. I'm guessing it will require an API call Your thoughts would be appreciated Cheers Kieran H |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I test for colour format in if statements? | Excel Worksheet Functions | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
Test printer parameter before continuing with macro | Excel Programming | |||
Send printer escape commands to a printer using VBA | Excel Programming | |||
Can I fill colour in a excel cell from a return from an "IF" test. | Excel Worksheet Functions |