You may not need a macro
Make sure you can see the pptx extension in Explorer
(If not in Folder Options UNTICK "Hide extensions for known file types"
Change the name from xxx.pptx tp xxx.pptx.zip
Double click and you should ,see folders. In PPT folder there is a Media folder that will have all the images
There is also a freebie on our site to automate this (No support or guarantee it will work for you (it will though)
PowerPoint Xtract