MOSS 2007 : Publishing page from email, workflow

By | April 11, 2007

MOSS 2007 provides out-of-the box (OOTB) document conversion process. It runs as job tools in MOSS job timer, and must be executed by the user. Now, the idea is to publish page into our ResepOke.Com from email attachment – so we don’t need to go to web site anymore to create a new page.

The solution

Since the OOTB document conversion only work from limited number of filetype (for example docx into aspx) – then we can not use email format to publish to page directly. Therefore, we will create the page in docx and attach to email to publish to site. In the server, we need an event receiver to detect new incoming document and trigger document conversion process. However, instead of creating an event receiver we can use a visual studio workflow solution.

Step-by-Step

1. Configure document library to receive from email

EmailWF1

EmailWF2

2. Create a component/class to extract embedded image and store into site images library.

3. Create a componen/class to launch document conversion process. You need correct transformer ID,

public class Tranformer
{
public const string Docx = “{6dfdc5b4-2a28-4a06-b0c6-ad3901e3a807}”;
public const string Docm = “{888d770d-d3e9-4d60-8267-3c05ab059ef5}”;
public const string Infopath = “{853d58f5-13c3-46f8-8b81-3ca4abcad7b3}”;
public const string Xsl = “{2798ee32-2961-4232-97dd-1a76b9aa6c6f}”;
}

4. Incorporate all component into visual studio workflow solution and deploy to the site. The workflow will check for docx document and execute image parsing and document conversion process.

EmailWF

5. Add workflow to site and attach to the document. Don’t forget to set-up start-up option of the workflow too.

EmailWF4

EmailWF5

And voila, if you send email to [email protected], then your page will be automatically published.

Leave a Reply