NativeExcel2 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]
PropertyBlackAndWhiteAsBoolean
[C#]
boolBlackAndWhite{get;set;}
[C++]
__propertyboolget_BlackAndWhite();
__propertyvoidset_BlackAndWhite(bool);
[JScript]
functiongetBlackAndWhite():bool
functionsetBlackAndWhite(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;
[VisualBasic]
book.Worksheets(1).PageSetup.BlackAndWhite = True
[C++]
book->Worksheets->Item[1]->PageSetup->BlackAndWhite = true;

See Also

IPageSetup Interface | NativeExcel Namespace | PageSetup Property