Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ keywords: Working with Notes

# Working with PowerPoint Notes

Notes are the contents associated with each slide and are visible only to the presenter when monitors are shared in “Presenter View”. It shows hint for the speaker, so it is often called as “Speaker Notes”. The presenter can optionally add key points to notes. You can add and modify the notes in your slide using Essential<sup>&reg;</sup> Presentation library.
Notes are the contents associated with each slide and are visible only to the presenter when monitors are shared in “Presenter View”. They show hints for the speaker, so they are often called “Speaker Notes”. The presenter can optionally add key points to notes. You can add and modify the notes in your slide using Syncfusion<sup>&reg;</sup> Presentation library.

## Prerequisites

Before you begin, make sure the following NuGet package is installed in your application. For more information on the assemblies and NuGet packages required for your target platform, refer to [Assemblies Required](Assemblies-Required) and [NuGet Packages Required](NuGet-Packages-Required).

## Adding Notes to a Slide

The below code example demonstrates how to create a Notes in a PowerPoint Slide.
The following code example demonstrates how to add notes to a PowerPoint slide.

{% tabs %}

Expand All @@ -27,9 +31,10 @@ ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
INotesSlide notesSlide = slide.AddNotesSlide();
//Adds text content into the Notes Slide.
notesSlide.NotesTextBody.AddParagraph("Notes content");
//Save the PowerPoint Presentation as stream
FileStream outputStream = new FileStream(OutputFileName, FileMode.Create);
pptxDoc.Save(outputStream);
//Saves the Presentation to the file system.
pptxDoc.Save("PresentationWithNotesSlide.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
Expand All @@ -43,6 +48,8 @@ INotesSlide notesSlide = slide.AddNotesSlide();
notesSlide.NotesTextBody.AddParagraph("Notes content");
//Saves Presentation with specified file name with extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
Expand All @@ -56,15 +63,19 @@ Dim notesSlide As INotesSlide = slide.AddNotesSlide()
notesSlide.NotesTextBody.AddParagraph("Notes content")
'Saves Presentation with specified file name with extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx")
'Closes the Presentation.
pptxDoc.Close()
{% endhighlight %}

{% endtabs %}

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/Notes/Add-notes-to-PowerPoint-slide).

## Adding Text into the Notes
N> `AddNotesSlide()` returns the newly created `INotesSlide` for the specified slide. If a notes slide already exists for that slide, the existing notes slide is returned. The notes slide can also be accessed through the `slide.NotesSlide` property.

The following code example demonstrates how to add a text in a Notes.
## Adding Text into the Notes

The following code example demonstrates how to add formatted text to notes.

{% tabs %}

Expand All @@ -76,20 +87,21 @@ IPresentation pptxDoc = Presentation.Create();
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Adds new notes slide in the specified slide.
INotesSlide notesSlide = slide.AddNotesSlide();
//Adds Paragraph into the text body.
//Adds a paragraph into the text body.
IParagraph paragraph = notesSlide.NotesTextBody.AddParagraph();
//Adds text part into the Paragraph.
//Adds a text part into the paragraph.
ITextPart textPart = paragraph.AddTextPart();
textPart.Text = "The notes slide represents the contents and key notes of the corresponding slide. It is more useful when we use Presenter View while presenting the seminars through SlideShow.";
//Sets Bold format for text content.
textPart.Font.Bold=true;
// Sets font style using font name.
textPart.Font.Bold = true;
//Sets font style using font name.
textPart.Font.FontName = "Times New Roman";
// Sets text content size using FontSize property.
//Sets text content size using FontSize property.
textPart.Font.FontSize = 20;
//Save the PowerPoint Presentation as stream
FileStream outputStream = new FileStream(OutputFileName, FileMode.Create);
pptxDoc.Save(outputStream);
//Saves the Presentation to the file system.
pptxDoc.Save("PresentationWithNotesText.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
Expand All @@ -99,19 +111,21 @@ IPresentation pptxDoc = Presentation.Create();
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Adds new notes slide in the specified slide.
INotesSlide notesSlide = slide.AddNotesSlide();
//Adds Paragraph into the text body.
//Adds a paragraph into the text body.
IParagraph paragraph = notesSlide.NotesTextBody.AddParagraph();
//Adds text part into the Paragraph.
//Adds a text part into the paragraph.
ITextPart textPart = paragraph.AddTextPart();
textPart.Text = "The notes slide represents the contents and key notes of the corresponding slide. It is more useful when we use Presenter View while presenting the seminars through SlideShow.";
//Sets Bold format for text content.
textPart.Font.Bold=true;
// Sets font style using font name.
textPart.Font.Bold = true;
//Sets font style using font name.
textPart.Font.FontName = "Times New Roman";
// Sets text content size using FontSize property.
//Sets text content size using FontSize property.
textPart.Font.FontSize = 20;
//Saves Presentation with specified file name with extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx");
pptxDoc.Save("PresentationWithNotesText.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
Expand All @@ -121,9 +135,9 @@ Dim pptxDoc As IPresentation = Presentation.Create()
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Adds new notes slide in the specified slide.
Dim notesSlide As INotesSlide = slide.AddNotesSlide()
'Adds Paragraph into the text body.
'Adds a paragraph into the text body.
Dim paragraph As IParagraph = notesSlide.NotesTextBody.AddParagraph()
'Adds text part into the Paragraph.
'Adds a text part into the paragraph.
Dim textPart As ITextPart = paragraph.AddTextPart()
textPart.Text = "The notes slide represents the contents and key notes of the corresponding slide. It is more useful when we use Presenter View while presenting the seminars through SlideShow."
'Sets Bold format for text content.
Expand All @@ -133,16 +147,20 @@ textPart.Font.FontName = "Times New Roman"
'Sets text content size using FontSize property.
textPart.Font.FontSize = 20
'Saves Presentation with specified file name with extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx")
pptxDoc.Save("PresentationWithNotesText.pptx")
'Closes the Presentation.
pptxDoc.Close()
{% endhighlight %}

{% endtabs %}

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/Notes/Add-text-in-notes).

## Adding a numbered list to Notes
N> In addition to `Bold`, `FontName`, and `FontSize`, the `ITextPart.Font` property exposes formatting options such as `Italic`, `Underline`, `FontColor`, `HighlightColor`, `StrikeThrough`, `BaselineAlignment`, and `FontScript`. For the full list of members, refer to the [ITextPart API reference](https://help.syncfusion.com/cr/document-processing/Syncfusion.Presentation.ITextPart.html).

The following code example demonstrates how to create simple numbered list as Notes.
## Adding a Numbered List to Notes

The following code example demonstrates how to create a simple numbered list as notes.

{% tabs %}

Expand Down Expand Up @@ -193,8 +211,7 @@ paragraph.FirstLineIndent = -20;
// Sets the bullet character size. Here, 100 means 100% of its text. Possible values can range from 25 to 400.
paragraph.ListFormat.Size = 100;
//Save the PowerPoint Presentation as stream
FileStream outputStream = new FileStream(OutputFileName, FileMode.Create);
pptxDoc.Save(outputStream);
pptxDoc.Save(OutputFileName);
//Closes the Presentation
pptxDoc.Close();
{% endhighlight %}
Expand Down Expand Up @@ -305,48 +322,58 @@ pptxDoc.Close()

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/Notes/Create-numbered-list-in-notes-slide).


## Removing Notes from a Slide

The below code example demonstrates how to remove a Notes from a PowerPoint Slide.
The following code example demonstrates how to remove the notes slide from a PowerPoint slide.

{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]"
playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PowerPoint-Examples/master/Notes/Remove-notes-from-slide/.NET/Remove-notes-from-slide/Program.cs" %}
//Loads or open an PowerPoint Presentation
FileStream inputStream = new FileStream(inputFileName,FileMode.Open);
IPresentation pptxDoc = Presentation.Open(inputStream);
//Gets instance of the first slide from the Presentation.
//Opens an existing PowerPoint presentation.
IPresentation pptxDoc = Presentation.Open("Sample.pptx");
//Gets the instance of the first slide from the presentation.
ISlide slide = pptxDoc.Slides[0] as ISlide;
//Removes Notes Slide from a corresponding slide.
//Removes the notes slide from the corresponding slide.
slide.RemoveNotesSlide();
//Save the PowerPoint Presentation as stream
FileStream outputStream = new FileStream(OutputFileName, FileMode.Create);
pptxDoc.Save(outputStream);
//Saves the Presentation to the file system.
pptxDoc.Save("PresentationWithNotesSlide.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
//Opens an existing PowerPoint presentation.
IPresentation pptxDoc = Presentation.Open("Sample.pptx");
//Gets instance of the first slide from the Presentation.
//Gets the instance of the first slide from the presentation.
ISlide slide = pptxDoc.Slides[0] as ISlide;
//Removes Notes Slide from a corresponding slide.
//Removes the notes slide from the corresponding slide.
slide.RemoveNotesSlide();
//Saves Presentation with specified file name with extension.
//Saves the Presentation with the specified file name and extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx");
//Closes the Presentation.
pptxDoc.Close();
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
'Opens an existing PowerPoint presentation.
Dim pptxDoc As IPresentation = Presentation.Open("Sample.pptx")
'Gets instance of the first slide from the Presentation.
'Gets the instance of the first slide from the presentation.
Dim slide As ISlide = TryCast(pptxDoc.Slides(0), ISlide)
'Removes Notes Slide from a corresponding slide.
'Removes the notes slide from the corresponding slide.
slide.RemoveNotesSlide()
'Saves Presentation with specified file name with extension.
'Saves the Presentation with the specified file name and extension.
pptxDoc.Save("PresentationWithNotesSlide.pptx")
'Closes the Presentation.
pptxDoc.Close()
{% endhighlight %}

{% endtabs %}

You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/Notes/Remove-notes-from-slide).
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/Notes/Remove-notes-from-slide).

## See Also

- [Working with Comments](Comments)
- [Working with Paragraphs](./Working-with-paragraphs)
Loading