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.).
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.
So, my questions are, in a PowerPoint VSTO add-in:
- Is there any way to determine the file format (other than just a file extension comparison)?
- Is it possible to determine if a save is a regular save or a save as?
Update
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).