How can I get the ActivePresentation file format from PowerPoint Interop

寵の児 提交于 2019-12-10 11:15:35

问题


...for the enum Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType?


回答1:


You actually can't get the file format, unfortunately. The best that can be done is to read the extention, like in this thread: How to obtain PowerPoint File Format Programmatically.

One other way is to use DSOFile to read the format.




回答2:


Once the presentation is loaded it has no file format, only the internal memory structure. So from that POV it doesn't make sense to have the fileformat of the active presentation. That being said, using the extension is a horrible way to determine file format...though it's better than nothing. The best way is to "sniff" the file, as mentioned in the second answer here



来源:https://stackoverflow.com/questions/2558882/how-can-i-get-the-activepresentation-file-format-from-powerpoint-interop

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!