Set ppApp = CreateObject("PowerPoint.Application")
Set ppPresentations = ppApp.Presentations
Set ppPres = ppPresentations.Open(Filepath, -1, 0, 0)
Set ppSlides = ppPres.Slides
ppSlides.Item(i).Export(Folderpath&"\"&iname&"."&format, format, imgW, imgH)