/// <summary> /// Add a comment to the specified slide /// </summary> /// <param name="slide">PPT.Slide object instance to add the comment to</param> /// <param name="comment">SlideComment object containing configuration for the slide comment</param> /// <returns></returns> public PPT.Slide AddComment(PPT.Slide slide, SlideComment comment) { PPT.Comment newComment = slide.Comments.Add( comment.LeftPosition, comment.TopPosition, comment.Author, comment.AuthorInitials, comment.Comment); return slide; }
/// <summary> /// Delete the specified comment from a slide /// </summary> /// <param name="slide">PPT.Slide object instance to delete the comment from</param> /// <param name="slideComment">The SlideComment object to delete</param> /// <returns></returns> public PPT.Slide DeleteComment(PPT.Slide slide, SlideComment slideComment) { foreach (PPT.Comment comment in slide.Comments) { if (comment.Text == slideComment.Comment && comment.Author == slideComment.Author && comment.AuthorInitials == slideComment.AuthorInitials) { comment.Delete(); } } return slide; }