Effacer les filtres
Effacer les filtres

Read notes from a PowerPoint presentation?

7 vues (au cours des 30 derniers jours)
Kapil Chauhan
Kapil Chauhan le 6 Déc 2021
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

Réponses (1)

Kautuk Raj
Kautuk Raj le 2 Juin 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.

Catégories

En savoir plus sur Use COM Objects in MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by