ShapeCollection.CopyCommentsInRange

ShapeCollection.CopyCommentsInRange method

Copy all comments in the range.

public void CopyCommentsInRange(ShapeCollection shapes, CellArea ca, int destRow, int destColumn)
ParameterTypeDescription
shapesShapeCollectionThe source shapes.
caCellAreaThe source range.
destRowInt32The dest range start row.
destColumnInt32The dest range start column.

Examples


[C#]
CommentCollection comments = workbook.Worksheets[0].Comments;

//Add comment to cell A1
int commentIndex = comments.Add(0, 0);
Comment comment = comments[commentIndex];
comment.Note = "First note.";
comment.Font.Name = "Times New Roman";

//Add comment to cell B2
comments.Add("B2");
comment = comments["B2"];
comment.Note = "Second note.";

CellArea area1 = new CellArea();
area1.StartColumn = 1;
area1.StartRow = 1;
area1.EndColumn = 5;
area1.EndRow = 4;

//copy
shapes.CopyCommentsInRange(shapes, area1, 5, 1);

See Also