"how to convert all *.potx files to *.pptx files with vba?" Code Answer


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

            'if you truly want to delete them, don't recommend since they are .potx
            fil.delete true
        end if

    next fil

end sub
By aceraven777 on October 10 2022

Answers related to “how to convert all *.potx files to *.pptx files with vba?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.