フィルターのクリア

Read notes from a PowerPoint presentation?

7 ビュー (過去 30 日間)
Kapil Chauhan
Kapil Chauhan 2021 年 12 月 6 日
回答済み: Kautuk Raj 2023 年 6 月 2 日
Hi,
Does anyone know if it is possible to read speaker notes for each slide in powerpoint from Matlab and collect them as a string/text? If so, how can one achieve it? I am trying to use the actxserver but am lost.
Thanks,
Kapil

回答 (1 件)

Kautuk Raj
Kautuk Raj 2023 年 6 月 2 日
As pointed out by you, actxserver function has to be used to read speaker notes for each slide in PowerPoint from MATLAB and collect them as a string/text. You can use the following steps:
Create an ActiveX object for PowerPoint using the actxserver function in MATLAB.
ppt = actxserver('PowerPoint.Application');
Open the PowerPoint presentation using the ppt.Presentations.Open method.
presentation = ppt.Presentations.Open('path/to/presentation.pptx');
Make sure to replace 'path/to/presentation.pptx' with the actual path to your PowerPoint presentation.
Loop through each slide in the presentation and extract the speaker notes using the Slide.NotesPage.Shapes.Placeholders.Item property.
notes = cell(1, presentation.Slides.Count);
for i = 1:presentation.Slides.Count
notes{i} = presentation.Slides.Item(i).NotesPage.Shapes.Placeholders.Item(2).TextFrame.TextRange.Text;
end
Close the presentation and quit PowerPoint using the presentation.Close and ppt.Quit methods.
presentation.Close;
ppt.Quit;
Concatenate the speaker notes for all slides into a single string using the strjoin function.
allNotes = strjoin(notes);
This code creates a single string allNotes that concatenates the speaker notes for all slides in the presentation, using the strjoin function.

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by