Module #12

Lab B: Using the Word Automation Service

This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.

This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.

© 2011 Microsoft. All rights reserved.

SharePoint Enterprise Content Management Implementers' Course

Contents

Overview

Exercises

Prerequisites

Exercise 1: Setting Up the Environment

Task 1: Ensure That Word Automation Services Starts

Task 2: Reduce the Time Between Timer Job Runs

Exercise 2: Using a Custom Workflow Action in SharePoint Designer

Exercise 3: Test Your Workflow

Overview

In this lab, you learn how to use a custom action within SharePoint Designer to create a custom workflow that can use the Word Automation Service to convert a document into XPS format and then declare it as an in-place record in a document library.

Exercises

1. Set up the environment.

2. Create a workflow to convert a document using the Word Automation Service.

3. Test your workflow.

Estimated time to completethis lab: 15 minutes.

Prerequisites

Installation of the ECMCourse.Module12.wsp farm solution

Activation at the Web application scope ( of the Convert Document feature.

Exercise 1: Setting Up the Environment

Task 1: Ensure That Word Automation Services Starts

  1. Open the SharePoint 2010 Central Administration web site by going to Start | All Programs | Microsoft SharePoint 2010 Product | SharePoint 2010 Central Administration.
  2. Select Yesif a User Account Control (UAC) dialog displays asking if you would like to give this program permissions.
  3. When the SharePoint 2010 Central Administration page opens, under the Application Management section, click the Manage Service Applications hyperlink.
  4. Ensure that Word Automation Services starts.

Task 2: Reduce the Time Between Timer Job Runs

This task provides you with faster feedback when your timer job runs. Changing this setting on a production environment may result in performance degradation.

  1. Open the SharePoint 2010 Central Administration web site by going to Start | All Programs | Microsoft SharePoint 2010 Product | SharePoint 2010 Central Administration.
  1. Select Yesif a User Account Control (UAC) dialog displays asking if you would like to give this program permissions.
  2. When the SharePoint 2010 Central Administration page opens, click the Monitoring link.
  3. Click the Review job definitions in Timer Jobs.
  4. Click the Word Automation Services Timer Job. You need to page through to get to this.
  5. Change the Recurring Schedule to be Every 1 minute(s).
  6. Click OK.

Exercise 2: Using a Custom Workflow Action in SharePoint Designer

Now that you have configured WAS to run every minute, you can build a custom workflow to make use of this. We have supplied a sample action to use to showcase the feature.

  1. Browse to
  2. Navigate to the Shared Documents document library.
  3. In the Library tab of the Ribbon, in the Settings group, select the Workflow Settings button.

  1. Click Create a Workflow in SharePoint Designer.
  2. You may see a warning from Internet Explorer informing you that A Website Wants to Open Web Content Using This Program on Your Computer. If you see this message, click Allow.
  3. SharePoint Designer now loads.
  4. To add a new workflow to your list, enter a name (Convert Document t XPS) and description.
  5. In the ECM Course group, add a Convert Document action by clicking the Action button on the Ribbon,
  6. Configure the action as follows:

URL: [%Current Item:Name%]

Output Format: XPS

Job ID: Variable: conversion job id

Overwrite status: Always overwrite

  1. Click the Check for Errors button in the Save group on the Ribbon. You should get a dialog box informing you that The Workflow Contains No Errors.
  2. Click the Publish button in the Save group on the Ribbon.
  3. Your workflow is now published.

Exercise 3: Test Your Workflow

  1. Browse to
  1. Navigate to the Shared Documents document library.
  2. Select a document within the document library, and click the Edit Properties button within the Documents tab on the Ribbon.
  3. In the Start a New Workflow section, click the link to Convert Document to XPS.
  4. Click Start.

Note: This process is not instantaneous. If you check the document library after your timer job has run, you should have an additional XPS copy of your original file.

1