<p>I'm interested in using Office 2007 to convert between the pre-2007 binary formats (.doc, .xls, .ppt) and the new Office Open XML formats (.docx, .xlsx, .pptx)</p>

<p>How would I do this? I'd like to write a simple command line app that takes in two filenames (input and output) and perhaps the source and/or destination types, and performs the conversion.</p>

[{'answer_id': 35644, 'author': 'Matt Dillard', 'author_id': 863, 'author_profile': 'https://Stackoverflow.com/users/863', 'pm_score': 2, 'selected': False, 'text': '<p>Microsoft has a page which gives several examples of writing scripts to "drive" MS Word.  <a href="http://gallery.technet.microsoft.com/scriptcenter/3f1802f7-60da-4d5a-841a-12ae8a2f8a4b" rel="nofollow noreferrer">One such example</a> shows how to convert from a Word document to HTML.  By changing the last parameter to any values listed <a href="http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.wdsaveformat%28VS.80%29.aspx" rel="nofollow noreferrer">here</a>, you can get the output in different formats.</p>\n'}, {'answer_id': 35647, 'author': 'Jason Z', 'author_id': 2470, 'author_profile': 'https://Stackoverflow.com/users/2470', 'pm_score': 0, 'selected': False, 'text': '<p>The easiest way would be to use Automation thru the Microsoft.Office.Interop. libraries.  You can create an instance of a Word application, for example.  There are methods attached to the Application object that will allow you to open and close documents, plus pretty much anything else you can accomplish in VBA by recording a macro.</p>\n\n<p>You could also just write the VBA code in your Office application to do roughly the same thing.  Both approaches are equally valid, depending on your comfort in programming in C#, VB.NET or VBA.</p>\n'}]
['https://Stackoverflow.com/questions/35639', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/113/']