Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created February 18, 2020 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/01299b860d20eec199d41b1e2c2df93e to your computer and use it in GitHub Desktop.
Save aspose-com-gists/01299b860d20eec199d41b1e2c2df93e to your computer and use it in GitHub Desktop.
Working with slide notes in PowerPoint
// Load PowerPoint presentation
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// Add new slide notes
INotesSlide note = mgr.AddNotesSlide();
note.NotesTextFrame.Text = "new slide note";
// Save presentation
presentation.Save("added-slide-notes.pptx", SaveFormat.Pptx);
// Load PowerPoint presentation
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// Read slide notes
INotesSlide note = mgr.NotesSlide;
Console.Write(note.NotesTextFrame.Text);
// Load PowerPoint presentation
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// Remove slide notes
mgr.RemoveNotesSlide();
// Save presentation
presentation.Save("removed-slide-notes.pptx", SaveFormat.Pptx);
// Load PowerPoint presentation
Presentation presentation = new Presentation("presentation.pptx");
INotesSlideManager mgr = presentation.Slides[0].NotesSlideManager;
// Access slide notes
INotesSlide note = mgr.NotesSlide;
// Update slide note's text
note.NotesTextFrame.Text = "this is updated note";
// Save presentation
presentation.Save("updated-slide-notes.pptx", SaveFormat.Pptx);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment