[英]How to read and store speaker notes from PowerPoint presentation file
如何從存儲在我的硬盤驅動器位置的 PowerPoint 演示文稿文件中讀取和存儲演講者備注?
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");
演示文稿的幻燈片集合中的每張幻燈片都有一個 NotePage 成員。 NotesPage 基本上是一個單獨的幻燈片,具有所有相同的集合和方法。 這是一個 VBA 函數,它將返回幻燈片中的注釋文本:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.