Advertisement

Mac Automation: automating Microsoft Word 2008

When Microsoft released Office 2008 for Mac, they did something that I must applaud -- they joined the ranks of Mac developers creating Automator-able applications. When you do a search in Automator for "Microsoft," it will reveal all of the Automator actions that ship with Microsoft Office 2008. There is lots of great stuff included, so we'll be covering some of it in this four part Mac Automation series. I will take you through how to automate each of the Microsoft Office applications: Word, Excel, PowerPoint, and Entourage.

First off, let's take a look at what you can automate in Word 2008. Doing a search for "Word" in Automator will display the available actions for Microsoft Word. As you can see, there are plenty of actions that you can automate. For this how-to, we'll focus on a workflow that does the following:

  • Creates a new document

  • Sets document properties

  • Gathers text from the clipboard

  • Places a watermark in the document

  • Saves the document

  • Prints the document

Continue reading to learn how to create this workflow.

For this workflow, you'll need the following Automator actions (in the same order):

  • Create New Word Document

  • Set Word Document Properties

  • Paste Clipboard Contents Into Word Documents

  • Add Watermark to Word Documents

  • Save Word Documents

  • Print Word Documents

You can then place in the appropriate text for "Set Word Document Properties," "Add Watermark to Word Documents," and "Save Word Documents." When you're done, your workflow should look something like this:



Running the workflow
First off you need something that has already been typed. The great thing about this workflow is that it allows you to copy text from any application; be it Pages, TextEdit, or your web browser. I have typed 4 simple paragraphs in TextEdit and will copy all of them by pressing Command + C on my keyboard. The text has been copied and now you can run the workflow. Just press the run button in the top right corner of Automator.


The workflow springs to life opening Microsoft Word, creating a new document, setting the page properties, pasting the text you previously copied, saving the Word document, and finally, printing it. When the workflow completes, you will see a Word document similar to the one below. A copy will also be printed on the default printer.


You can then save your Automator workflow to your desired format. You have to commend Microsoft for making Office 2008 so seamlessly integrated into Mac OS X Leopard. I will show you how to automate more areas of Microsoft Office in the near future.