Is there a method for detecting comments in PowerPoint files (PPT and PPTX) using Aspose?
Thank you,
Kim
Is there a method for detecting comments in PowerPoint files (PPT and PPTX) using Aspose?
Thank you,
Kim
Hi Kim,
Hi Mudassir,
We are actually looking to detect annotation comments in PPT files, not slide notes. Is that something that is supported?
Thank you,
Kim
Hi Kim,
Hi Mudassir,
Thank you for sharing the sample project with us however this appears to show how to add comments to a PPT or PPTX. We're trying to detect if comments already exist in a PPT or PPTX.
Best regards,
Kim
Hi Kim,
public static void IdentifyPptComments(){String path = @"…";Presentation pres = new Presentation(path + “Comments.ppt”);int i=1;foreach(Slide slide in pres.Slides){foreach(Comment comment in slide.SlideComments){Console.WriteLine(“Slide :”+i.ToString()+" has comment: “+comment.Text+” with Author: “+comment.Author+ " posted on time :”+comment.CreatedTime+"\n");i++;}}}public static void IdentifyPptxComments(){String path = @"…";PresentationEx pres = new PresentationEx(path + “Comments.pptx”);int i = 1;foreach (CommentAuthorEx author in pres.CommentAuthors){foreach (CommentEx comment in author.Comments){Console.WriteLine(“Slide :” + comment.Slide.SlideNumber+ " has comment: " + comment.Text + " with Author: " + comment.Author + " posted on time :" + comment.CreatedTime + “\n”);}}}
Thank you. I will share this with my developer.
Best regards,
Kim
slide.SlideComments is not available in the latest version of the lib. Can you give me a sample using latest version on how to find out the comments added to the slides in the ppt/pptx.
I have observed your requirements and suggest you to please visit this documentation link to serve the purpose on your end. I hope the shared information will be helpful.
Got it. Its working now thank you.
And how do we get the same feature in Excel. I mean how to detect the comments from the excel
See the sample code on how to get comments in an Excel worksheet for your reference:
e.g
Sample code:
Workbook wb = new Workbook("Book1.xlsx");
//Retrieving comments from the first worksheet
CommentCollection comments = wb.Worksheets[0].Comments;
for (int i = 0; i < comments.Count; i++)
{
Comment comment = comments[i];
string text = comment.Note;
string name = comment.CommentShape.Name;
}
Also, see the document for your further reference.
Hope, this helps a bit.
Sorry one last thing need the same feature word document as well. I mean how to detect the comments from the .doc file.
Thanks for your inquiry. Please check the following code example and read the following article. Hope this helps you.
Working with Comments
Document doc = new Document(MyDir + "in.docx");
foreach (Comment comment in doc.GetChildNodes(NodeType.Comment, true))
{
Console.WriteLine(comment.ToString(SaveFormat.Text));
}