Read, Add, Update or Remove Slide Notes in PowerPoint Presentations using C#

read add update and remove slide notes in PowerPoint using C# .NET

Slide notes in the PowerPoint presentations are used to add references for the presenter to recall the important points during the presentation. These notes can be added to every slide of a PowerPoint presentation. This article also covers some important aspects of dealing with slide notes in presentations programmatically.

After reading this article, you will be able to:

  • read slide notes in PowerPoint presentation using C#,
  • add slide notes to a PowerPoint presentation in C#,
  • update notes in a particular slide of the PowerPoint presentation in C#, and
  • remove slide notes in a PowerPoint presentation using C#.

Working with Slide Notes using Aspose.Slides for .NET

In order to work with slide notes in PowerPoint, we’ll use Aspose.Slides for .NET – a powerful PowerPoint automation API that supports creating, updating, parsing and converting presentation documents. You can download the API or install it using the following options:

Using NuGet Package Manager

read or update slide notes in PowerPoint C# .NET

Using the Package Manager Console

PM> Install-Package Aspose.Slides.NET

Read Slide Notes from PowerPoint Presentation in C#

In order to access the slide notes in PowerPoint, Aspose.Slides for .NET provides INotesSlideManager interface. INotesSlideManager lets you access, read, add and update the slide notes. The following are the steps to read the slide notes from the PowerPoint presentation.

The following code sample shows how to read slide notes from a PowerPoint PPTX using C#.

Add Notes to a PowerPoint Slide in C#

The following are the steps to add notes to a particular slide in a PowerPoint presentation.

  • Load the PowerPoint presentation in the Presentation object.
  • Access the NotesSlideManager of particular slide.
  • Use the INotesSlide interface to add a new note.
  • Save the presentation using Presentation.Save(String, SaveFormat) method.

The following code sample shows how to add slide notes to a PowerPoint PPTX using C#.

Update Slide Notes in PowerPoint Presentation using C#

In order to update the notes in a particular presentation slide, you will access the NotesSlide in the same way you have done for reading the notes. Once you have got access to the slide notes, you can simply update the text using INotesSlide.NotesTextFrame.Text property. Once done, save the presentation file using the Presentation.Save(String, SaveFormat) method.

The following code sample shows how to update slide notes in a PowerPoint presentation using C#.

Remove Slide Notes in PowerPoint Presentation using C#

To remove the slide notes from a PowerPoint presentation, simply call INotesSlideManager.RemoveNotesSlide() method and save the presentation file. The following code sample shows how to remove slide notes from a PowerPoint presentation using C#.

See also

Try Aspose.Slides for .NET for Free

You can try Aspose.Slides for .NET using a free temporary license.