How to identify if a .ppt file is in 2003 format or 97 format or 95 format -


i have xxx.ppt file. need identify if file in 2003 format or 97 format or 95 format or version older that. tried checking file properties, says microsoft powerpoint. no version mentioned. tried apache poi , got version number "ppt version[50334156]". couldn't find specification documents pre 97 format files either. working these binary files such pain.

i have no idea why need found extreamly interesting (can done?) wrote ugly powershell hack.

 $shell = new-object -com shell.application  rename-item c:\temp\presentation1.ppt c:\temp\presentation1.zip  $zip = $shell.namespace(“c:\temp\presentation1.zip”)  mkdir c:\temp\ziptest  foreach($item in $zip.items())  {     $shell.namespace(“c:\temp\ziptest”).copyhere($item)  }   $file = get-content c:\temp\ziptest\docprops\app.xml | select-string -pattern ("<appversion>([\s\s]*?)</appversion>")   remove-item -recurse -force c:\temp\ziptest\   clear   echo $file.matches[0].groups[1].value 

to use have add function reads ppt files variable , loops through snippet, snippet rename them .zip (and enable read xml files ppt) app.xml , give version number (office95 = 7.0, office 97 (8.0), office 97 powered word 98 (8.5), office 2000 (9.0), office xp (10.0),office 2003 (11.0),office 2007 (12.0), office 2010 (14.0), office 2013 (15.0))


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -