in reply to Save as .xlsm file

Although the advice to search on MSDN is a good one, sometimes MS does its best to obfuscate information. As a service to all, I rummaged about and managed to find the definition of the XlFileformat Enumeration (aka, the options you would use in scripting via VBA or Win32::OLE to save):

http://msdn.microsoft.com/en-us/library/bb241279.aspx

I think the one you want for xlsm is xlOpenXMLWorkbookMacroEnabled

Replies are listed 'Best First'.
Re^2: Save as .xlsm file
by Monk89 (Initiate) on Jun 30, 2009 at 18:27 UTC
    Thanks to all , it worked when i specifed FileFormat => 52. Ya string "xlOpenXMLWorkbookMacroEnabled" instead of 52 should also work. And yes we require MS 2007 installed.