How to convert all *.potx files to *.pptx files with VBA?
I have a folder of ~20 *.potx files and I would like to convert all *.potx files to *.pptx, then delete the *.potx files. The following will loop through all your templates, convert, and delete the template files. Sub loopFiles() Dim fso As New FileSystemObject Dim fil As File Dim fold As Folder Set fold = fso.GetFolder(yourFolder) For Each fil In fold.Files If InStr(1, fil.Name, ".potx") > 0 Then Application.Presentations.Open fil.Path ActivePresentation.SaveAs Replace(fil.Path, ".potx", ".pptx"), ppSaveAsDefault ActivePresentation.Close 'if you truly want to delete them, don't recommend