AddModernComment()

CommentCollection::AddModernComment(System::String, System::SharedPtr<ISlide>, System::SharedPtr<IShape>, System::Drawing::PointF, System::DateTime) method

Add new modern comment at the end of a collection.

System::SharedPtr<IModernComment> Aspose::Slides::CommentCollection::AddModernComment(System::String text, System::SharedPtr<ISlide> slide, System::SharedPtr<IShape> shape, System::Drawing::PointF position, System::DateTime creationTime) override

Arguments

ParameterTypeDescription
textSystem::StringPlain text of a new modern comment.
slideSystem::SharedPtr<ISlide>Slide in a presentation where to add a new modern comment.
shapeSystem::SharedPtr<IShape>Shape on a slide to which a new modern comment is associated.
positionSystem::Drawing::PointFPosition on a slide where to add a new modern comment.
creationTimeSystem::DateTimeTime of a modern comment creation.

Return Value

Added modern comment.

Remarks

auto pres = System::MakeObject<Presentation>();
auto slide = pres->get_Slides()->idx_get(0);

auto newAuthor = pres->get_CommentAuthors()->AddAuthor(u"Some Author", u"SA");
newAuthor->get_Comments()->AddModernComment(u"This is modern comment", slide, nullptr, PointF(100.0f, 100.0f), DateTime::get_Now());

pres->Save(u"output.pptx", SaveFormat::Pptx);

See Also