How to read and store speaker notes from PowerPoint presentation file that is stored in my hard drive location?
using Microsoft.Office.Interop.PowerPoint;
Application PowerPoint_App = new Application();
Presentations multi_presentations = PowerPoint_App.Presentations;
Presentation presentation = multi_presentations.Open(@"D:\Peak Sourcing\Work\ppt_test\presenting.ppt");
Each slide in the presentation's Slides collection has a NotePage member. The NotesPage is basically a separate slide with all the same collections and methods. Here's a VBA function that will return the notes text from a slide:
Function NotesText(oSl As Slide) As String
Dim oSh As Shape
For Each oSh In oSl.NotesPage.Shapes
If oSh.Type = msoPlaceholder Then
If oSh.PlaceholderFormat.Type = ppPlaceholderBody Then
If oSh.TextFrame.HasText Then
NotesText = oSh.TextFrame.TextRange.Text
End If
End If
End If
Next
End Function
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.