Note
Contents
[
Hide
]
This article demonstrates how to add, read, remove, and update notes slides using Aspose.Slides for C++.
Add a Notes Slide
Create a notes slide and assign text to it.
static void AddNote()
{
auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);
auto notesSlide = slide->get_NotesSlideManager()->AddNotesSlide();
slide->get_NotesSlideManager()->get_NotesSlide()->get_NotesTextFrame()->set_Text(u"My note");
presentation->Dispose();
}
Access a Notes Slide
Read text from an existing notes slide.
static void AccessNote()
{
auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);
auto notesSlide = slide->get_NotesSlideManager()->AddNotesSlide();
auto notes = notesSlide->get_NotesTextFrame()->get_Text();
presentation->Dispose();
}
Remove a Notes Slide
Remove the notes slide associated with a slide.
static void RemoveNote()
{
auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);
auto notesSlide = slide->get_NotesSlideManager()->AddNotesSlide();
slide->get_NotesSlideManager()->RemoveNotesSlide();
presentation->Dispose();
}
Update Notes Text
Change the text of a notes slide.
static void UpdateNoteText()
{
auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);
auto notesSlide = slide->get_NotesSlideManager()->AddNotesSlide();
slide->get_NotesSlideManager()->get_NotesSlide()->get_NotesTextFrame()->set_Text(u"Old");
slide->get_NotesSlideManager()->get_NotesSlide()->get_NotesTextFrame()->set_Text(u"Updated");
presentation->Dispose();
}