NativeExcel2 for .Net Developer's Reference

IFont.ThemeColor Property

Returns or sets theme color of the font. Read/write int.

[Visual Basic]
PropertyThemeColorAsInteger
[C#]
intThemeColor{get;set;}
[C++]
__propertyintget_ThemeColor();
__propertyvoidset_ThemeColor(int);
[JScript]
functiongetThemeColor():int
functionsetThemeColor(int);

Example

This example sets theme color of the font in the range A1:D1.

[C#]
book.Worksheets[1].Range["A1"].Font.ThemeColor = 5;
[VisualBasic]
book.Worksheets(1).Range("A1").Font.ThemeColor = 5
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1"]->Font->ThemeColor = 5;

See Also

IFont Interface | NativeExcel Namespace