I’m using the following code to export PNG file from the active PPT file. I find that I need the file names to be THREE digits. Instead of “01.png”, “02.png”, etc., I need “001.png”, “002.png”, etc.
Can you help me? I tried
sImageName = Format(oSlide.SlideIndex, "000") & ".png"
but that didn’t work.
Export section code that does work:
For Each oSlide In ActivePresentation.Slides
sImageName = Format(oSlide.SlideIndex, "00") & ".png"
oSlide.Export sImagePath & sImageName, "PNG"
Next oSlide
Thank you in advance!
You have got the solution, the format should be set to “000” instead of “00”
This code runs correctly in Powerpoint 2010
and produces file names like “001.png”