Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a number of documents managed in a team site that are organisational policies.

What is the best way of taking documents that have been marked as "approved" in the document library and publish them as HTML (e.g. aspx pages).

I have been thinking I would program a workflow, and use Word Automation services. I see that the Word Automation feature has an output type of "MHTML", but can this be used in a publishing site? If so, how?

Thanks, Richard

share|improve this question
add comment

1 Answer

Firstly, lets talk about how to trigger the event of publishing as HTML. There are two options here:

  1. Sharepoint Custom Code Workflow - Your only option in terms of workflow as SP Designer workflows does not allow running of custom code as a Action step. Custom code workflows can get a bit tricky though because of multi threading issues (i've had nightmares while working with these). Still, it can be done.

  2. Custom Sharepoint Event Receiver. Handle ItemUpdated event and check if its publishing approval status = approved. In my view, much easier to work with and much more control.

In your Event Receiver create a class that will take the word document, convert to MHTML using Work Automation Services (read here 2d00-how-it-works.aspx">http://blogs.office.com/b/microsoft-word/archive/2010/01/18/word-automation-services-2d00-how-it-works.aspx) and save the HTML back to your publishing site.

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.