Is there a way to get comments from slide using Aspose.Slides?
Thanks!
Is there a way to get comments from slide using Aspose.Slides?
Thanks!
Dear becky,
Thank you for using Aspose.Slides,
If you mean slide notes by slide comments, then Aspose.Slides gives read/write access to notes of the slide.
You can retrieve the text inside the notes using this code snippet.
string fstSlideNotesText = objPresentation.GetSlideByPosition(1).Notes.Text;
Actually I am looking for a way to retrieve comments (the balloon) instead of notes, or at least a way to detect if a ppt has comments or not.
Thanks.
Dear becky,
The balloon you are talking about is actually an AutoShape. To detect it, you should iterate to all shapes and get their type, if shape type is AutoShape, you should type cast it into AutoShape and then read its ShapeType property to see its type like Balloon OvalBalloon etc.
You can also read text inside the shape if it has any by using shape’s TextFrame.Text property.
To see more information about ShapeType Enumeration, AutoShape and Shape class, see Aspose.Slides APIs
I inserted the comments using MS Powerpoint's Insert menu and selected Comment (it has the behavior of showing you the balloon when you click on the "little tag", and hide the balloon when you click anywhere else on the slide), not sure it is the same thing as Autoshape which is basically just drawing shapes on the slides.
Any suggestions? Thanks!
Dear becky_bai
I don’t think, there is any way to read such a comment from a slide using Aspose.Slides. But I need to confirm it. If there is any, I will again post here.
If there is a way just to detect the existence of such comment, that’ll be good too. Your help is much appreciated, please let me know either way. Thanks!
Dear becky_bai,
Current version of Aspose.Slides do not support these comments, so neither you can read them nor detect them. Aspose.Slides development knows, how they work, so it would be very easy to implement them in future releases of Aspose.Slides. We will notify you when we will incorporate this feature inside Aspose.Slides.
That’s great to hear! I am looking forward the future release, is there an estimate of when this feature can be in? I want to make sure we can use your product for the application we are developing. Thanks!
Dear becky_bai,
Comments detection will most probably be done within next week, reading text will be done later.
Great, thanks!
Dear becky_bai,
Now you can detect and read comments on a slide using Aspose.Slides 2.6.7.0. Download it from here.
void SlideComments()
{
Presentation pres = new Presentation("srcSlideComments.ppt");
Slide fstSlide = pres.GetSlideByPosition(1);
Console.WriteLine("[Comment]=" + fstSlide.SlideComments[0].Text);
}
Thanks so much, you guys are the best!