Clement
Clement

Reputation: 4307

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

How can I convert a pptx file to a ppt 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

Upvotes: 0

Views: 3425

Answers (2)

knb
knb

Reputation: 9303

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

Upvotes: 1

Shaunak
Shaunak

Reputation: 18028

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

Upvotes: 0

Related Questions