Azzera filtri
Azzera filtri

Read notes from a PowerPoint presentation?

7 visualizzazioni (ultimi 30 giorni)
Kapil Chauhan
Kapil Chauhan il 6 Dic 2021
Risposto: Kautuk Raj il 2 Giu 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

Risposte (1)

Kautuk Raj
Kautuk Raj il 2 Giu 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.

Categorie

Scopri di più su Use COM Objects in MATLAB in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by