NativeExcel2 for .Net Developer's Reference

IFont.Bold Property

Gets or sets a value that indicates whether the font is bold.

[Visual Basic]
PropertyBoldAsBoolean
[C#]
boolBold{get;set;}
[C++]
__propertyboolget_Bold();
__propertyvoidset_Bold(bool);
[JScript]
functiongetBold():bool
functionsetBold(bool);

Property Value

true if the font is bold; otherwise, false.

Example

This example sets the font to bold for the range A1:A5 on sheet one.

[C#]
book.Worksheets[1].Range["A1:A5"].Font.Bold = true;
[VisualBasic]
book.Worksheets(1).Range("A1:A5").Font.Bold = true
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:A5"]->Font->Bold = true;

See Also

IFont Interface | NativeExcel Namespace