title: Pywin32 Saving as XLSM file instead of XLSX
body: <p>When I currently attempt to save an XLSM file like so:</p>
  
  <pre><code>from win32com.client import Dispatch
  
  # Open Excel workbook
  xl = Dispatch("Excel.Application")
  wb = xl.Workbooks.Add(r"C:\Users\ryan\Desktop\Book1.xlsm")
  
  # Make some changes
  # blah blah blah
  
  # Save the workbook in XLSM format with new name
  
  wb.SaveAs(r"C:\Users\ryan\Desktop\Book1 - XLSM.xlsm")
  xl.Quit()
  </code></pre>
  
  <p>I am given the following error...</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;COMObject Add&gt;", line 7, in SaveAs
  pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft Excel'
  , 'This extension can not be used with the selected file type. Change the file e
  xtension in the File name text box or select a different file type by changing t
  he Save as type.', 'xlmain11.chm', 0, -2146827284), None)
  </code></pre>
  
  <p>How do I save as a new file format?</p>
  
  <p>Note- this causes the same error when trying to save a file that was already an XLSM, as an XLSM.</p>