CodePlex project for Word Automation Services
I’ve just published the first release for a CodePlex project I started to provide sample projects / solutions for using the Word Automation Services in SharePoint 2010.
Word Automation Services allow you to convert document to and from different formats.
File formats the service can read:
- Office Open XML (DOCX, DOCM, DOTX, DOTM)
- Word 97-2003 Document (DOC) and Word 97-2003 Template (DOT)
- Rich Text Format (RTF)
- Single File Web Page (MHTML)
- HTML
- Word 2003 XML
- Word 2007/2010 XML
File formats the service can write:
- XPS
- Office Open XML (DOCX, DOCM)
- Word 97-2003 Document (DOC)
- Rich Text Format (RTF)
- Single File Web Page (MHTML)
- Word 2007/2010 XML
(source)
As far as I’ve found out, there are no UI features available out-of-the-box to use these services, so I’ve decided to create some. The first one is a custom workflow action you can use in SharePoint Designer to convert a document to many of the supported formats.
In the workflow designer you can add the “Convert Document” action:
The action is inserted into the workflow step where you can specify the url of the output file, select the output format and save options and select a variable for storing the conversion job id (which you can use later to retrieve the status, as the job runs asynchronous):
The job id is also logged into the Workflow History Log (the second entry is from a second workflow action that logs the returned conversion job id variable):
After the job has run, which can take up to a few minutes (depending on the word automation services settings), the converted document appears in the library:
The custom workflow action is one of the first features for Word Automation in SharePoint 2010 I’ve planned to release. Other features will be a Ribbon and Item context menu extension and more Workflow actions.
Let me know if you have any suggestions for improvement or other functionality you would like to see.