Filter löschen
Filter löschen

Read notes from a PowerPoint presentation?

7 Ansichten (letzte 30 Tage)
Kapil Chauhan
Kapil Chauhan am 6 Dez. 2021
Beantwortet: Kautuk Raj am 2 Jun. 2023
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

Antworten (1)

Kautuk Raj
Kautuk Raj am 2 Jun. 2023
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.

Kategorien

Mehr zu Use COM Objects in MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by