NativeExcel2 for .Net Developer's Reference

IComment.Shape Property

Returns an IShape interface that represents the shape attached to the specified comment.

[Visual Basic]
PropertyReadOnlyShapeAsIShape
[C#]
IShapeShape{get;}
[C++]
__propertyIShape*get_Shape();
[JScript]
functiongetShape():IShape

Property Value

IShape interface.

Example

This example sets the width and text of comment for cell E5.

[C#]
IComment comment = book.Worksheets[1].Range["E5"].AddComment();
comment.Text = "comment";
comment.Shape.Width = 300; 
[VisualBasic]
Dim comment As IComment = book.Worksheets(1).Range("E5").AddComment()
comment.Text = "comment"
comment.Shape.Width = 300 
[C++]
IComment* comment = book->Worksheets->Item[1]->Range->Item[S"E5"]->AddComment();
comment->Text = S"comment";
comment->Shape->Width = 300; 

See Also

IComment Interface | NativeExcel Namespace