NativeExcel for .Net Developer's Reference

IPageSetup.BlackAndWhite Property

Gets or sets a value that indicates whether the sheet will be printed in black and white.

[Visual Basic]
Property BlackAndWhite As Boolean
[C#]
bool BlackAndWhite { get; set; }
[C++]
__property bool get_BlackAndWhite();
__property void set_BlackAndWhite(bool );
[JScript]
function get BlackAndWhite() : bool
function set BlackAndWhite(bool);

Property Value

True if the sheet will be printed in black and white.

Example

This example sets the sheet to be printed in black and white.

[C#]
book.Worksheets[1].PageSetup.BlackAndWhite = true;
[Visual Basic]
book.Worksheets(1).PageSetup.BlackAndWhite = True
[C++]
book->Worksheets->Item[1]->PageSetup->BlackAndWhite = true;

See Also

IPageSetup Interface | NativeExcel Namespace | PageSetup Property