NativeExcel for .Net Developer's Reference

IFont.Bold Property

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

[Visual Basic]
Property Bold As Boolean
[C#]
bool Bold { get; set; }
[C++]
__property bool get_Bold();
__property void set_Bold(bool );
[JScript]
function get Bold() : bool
function set Bold(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;
[Visual Basic]
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