title: How do I find out the file format of a presentation in PowerPoint VSTO?
body: <p>I have been working on some Office add-ins for the 2007 Office System. The add-ins need to know the file format as they are only to perform their actions when the format is one of the newer compressed XML-based formats (docx, xlsx, xlsm, pptx, etc.).</p>
  
  <p>Despite the disparity in the APIs (calls and behaviours) for each Office product, I have managed to produce working add-ins for Word and Excel. In both of these, I can detect the save event and make my changes based on the file format and whether it is a save or save as operation. However, I have come to PowerPoint and I am struggling to determine what format the file is or is being saved as and whether it is a regular save or a save as operation.</p>
  
  <p>So, my questions are, in a PowerPoint VSTO add-in:</p>
  
  <ul>
  <li>Is there any way to determine the file format (other than just a file extension comparison)?</li>
  <li>Is it possible to determine if a save is a regular save or a save as?</li>
  </ul>
  
  <p><strong>Update</strong><br>
  Okay, I changed my search and found these questions that seem to answer my first question (i.e. there is no way other than to use the extension), but the second question still stands (perhaps until I improve my search-fu).</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2916154/how-to-obtain-powerpoint-file-format-programmatically">How to obtain PowerPoint File Format Programmatically</a>  </li>
  <li><a href="https://stackoverflow.com/questions/2558882/how-can-i-get-the-activepresentation-file-format-from-powerpoint-interop">How can I get the ActivePresentation file format from PowerPoint Interop</a></li>
  </ul>