SaveAs File Type

Dec 8, 2011 at 5:24 AM

I'm successfully opening an .xlsm file, reading and manipulating data, and then saving a copy of the file in an archive.  However, I'd like to convert the file to .xlsx when archiving.  Is there a way to convert the file to .xlsx when saving?  I tried just changing the extension to .xlsx with the SaveAs, hoping it would strip the macros during the save but that didn't work, I just get an invalid file format error.

Not a big deal if it can't be done but would be nice.



Dec 8, 2011 at 8:02 PM

Nothing build in to the library to do that. You will need to remove the VBAProject.bin from the package and the relationship to the workbook.