I need to determine whether the ActivePresentation
is 97-2003 or 2007 format. I really won't want to check the extension.
Is there a property somewhere inside the PowerPoint Object Model which gives this info?
I need to determine whether the ActivePresentation
is 97-2003 or 2007 format. I really won't want to check the extension.
Is there a property somewhere inside the PowerPoint Object Model which gives this info?
When the presentation is open there is no file format, its all in memory. However the file it came from can be in either the older binary format or the newer OpenXML format. The easiest way to tell the difference is to look at the first few bytes of the file.
For the binary formats it is an OLE Compound File which will always start with the bytes: 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1.
For the newer formats it is a ZIP file which will always start with the bytes: 0x50, 0x4B, 0x03, 0x04
Looking at the first few bytes of the file is the best way to quickly determine the file type, though it takes more work.
There is no File Format property, unfortunately. You'll have to go the extention route, like: