Your slide deck is a zip file in disguise

Show me!

I need more proof

Neat. But how is this useful?

function extractSlideNotes()
local i=0;
local DIR=${1:-.}; # Default is current folder
# XML path to slide notes: <p:txBody> -> <a:p> --> <a:r> --> <a:t> (see notesSlide.xml files)
local XPATH="//*[local-name()='txBody']/*[local-name()='p']/*[local-name()='r']/*[local-name()='t']/text()";
# Loop through each slide
for FILE in ${DIR}/ppt/notesSlides/*.xml;
(( i++ ));
# Fetch and output the notes
local NOTES=$(xmllint --xpath ${XPATH} ${FILE});
echo -e ${i} "\t" ${NOTES};
$ extractSlideNotes ~/Desktop/sample/
1 Notes on slide 1
2 Notes on slide 2
3 Notes on slide 3

What about adding slides?

Sub Test()
Dim pptSlide As Slide, pptLayout As CustomLayout
Set pptLayout = ActivePresentation.Slides(1).CustomLayout

For Index = 1 To 5
slideID = ActivePresentation.Slides.Count + 1

' Create new slide
Set pptSlide = ActivePresentation.Slides.AddSlide(slideID, pptLayout)

' Add a new image to that slide from /Users/robert/Desktop/images/figure*.png
pptSlide.Shapes.AddPicture fileName:="Users:robert:Desktop:images:figure" & Index & ".png", LinkToFile:=msoTrue, SaveWithDocument:=msoTrue, Left:=0, Top:=100
End Sub

It’s a wrap



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store