NativeExcel for .Net Developer's Reference

ILineFormat.Weight Property

Gets or sets the weight of the specified line in points (1/72 inch).

[Visual Basic]
Property Weight As Double
[C#]
double Weight { get; set; }
[C++]
__property double get_Weight();
__property void set_Weight(double );
[JScript]
function get Weight() : double
function set Weight(double);

Property Value

double. The weight of the specified line measured in points (1/72 inch).

Example

This example changes the border's weight for the comment on cell B2

[C#]
IComment comment = book.Worksheets[1].Range["B2"].Comment;
if (comment != null) 
{
    comment.Shape.Line.Weight = 4;
}
[Visual Basic]
Dim comment As IComment = book.Worksheets(1).Range("B2").Comment
If Not comment Is Nothing Then
   comment.Shape.Line.Weight = 4
End If
[C++]
IComment* comment = book->Worksheets->Item[1]->Range->Item[S"B2"]->Comment;
if (comment != null) 
{
   comment->Shape->Line->Weight = 4;
}

See Also

ILineFormat Interface | NativeExcel Namespace