AddModernComment

ICommentCollection.AddModernComment 方法

在集合的末尾添加新的现代评论。

public IModernComment AddModernComment(string text, ISlide slide, IShape shape, PointF position, 
    DateTime creationTime)
参数类型描述
textString新现代评论的纯文本。
slideISlide在演示文稿中添加新现代评论的幻灯片。
shapeIShape与新现代评论相关联的幻灯片中的形状。
positionPointF在幻灯片上添加新现代评论的位置。
creationTimeDateTime现代评论创建的时间。

返回值

添加的现代评论。

示例

[C#]
using (Presentation pres = new Presentation())
{
    ICommentAuthor newAuthor = pres.CommentAuthors.AddAuthor("Some Author", "SA");
    newAuthor.Comments.AddModernComment("This is modern comment", pres.Slides[0], null, new PointF(100, 100), DateTime.Now);

    pres.Save(outPptxFileName, SaveFormat.Pptx);
}

另请参见