开发者

How to convert powerpoint pptx file to ppt file programmatically without powerpoint installed?

开发者 https://www.devze.com 2023-03-23 22:26 出处:网络
How can I convert a pptx file to a pp开发者_如何学Ct file programmatically. This happens on a web server that does not have PowerPoint installed.

How can I convert a pptx file to a pp开发者_如何学Ct file programmatically. This happens on a web server that does not have PowerPoint installed. I'm after a free solution preferably.

I may consider installing PowerPoint on the server if it is not possible but I'm concerned about the scalability of that solution. I wouldn't want the server to be struggling because multiple conversions are in progress...

Thanks


You could install OpenOffice Impress (Libre Office Impress) on the server, maybe it can do the document conversion.

I hear that in OpenOffice, there are python APIs avalaible, and maybe more, even a VBA clone.

It is probably not possible to convert from the command line like this,

ooimpress -infile "mydoc.pptx" -outfile "mydoc.ppt" 

In any case, the conversion will probably not be perfect. If your pptx files contain embedded OLE documents, expect problems.

SImple slides with bulleted lists and some simple graphics objects (circles, arrows, Raster Graphics files such as gifs) are less likely to be a problem.

Here are some links to openoffice forum-threads with similar problems.

.doc to .pdf, all command-line? http://www.oooforum.org/forum/viewtopic.phtml?t=5513

Help! - Simple command line conversion of Word doc to XML http://www.oooforum.org/forum/viewtopic.phtml?t=7242


The presentation object has a SaveAs method that can do this. For instance, for saving the active presentation as a .ppt file, the following code would do the job:

ActivePresentation.SaveAs "FileName.ppt", ppSaveAsPresentation

Reference:

http://www.pcreview.co.uk/forums/programmatic-conversion-pptx-into-ppt-t3339221.html

0

精彩评论

暂无评论...
验证码 换一张
取 消