Hardware Reference
In-Depth Information
Automate Individual Apps
In the previous chapter, I told you about system-wide automation technologies built into OS
X. Although these technologies (particularly AppleScript and Automator) can also automate
theactionsofindividual apps,there'softenabetter—or, atleast,morethorough—way ofdoing
that within an app itself. That's the topic of this chapter: using apps' built-in automation
capabilities.
Due to the breadth and depth of in-app automation features, I can only provide an overview,
basic instructions, and a few examples. You'll be able to accomplish some basic tasks and
discover how to learn more.
I begin with Microsoft Office, partly because of its popularity and partly because of its
extensive built-in programming language. I then move to Nisus Writer Pro, the very app I'm
using to type these words, to illustrate a few different forms of automation that should be
useful to anyone who works with words. Then I briefly discuss Google Apps Script, a macro
language for Google Apps, and list the automation capabilities of several other popular apps.
Tip: If you want to automate Apple's iWork apps (Pages, Numbers, Keynote), you'll
need to use either AppleScript or Automator. You can learn more about AppleScript for
iWork at Automating iWork with AppleScript , part of the Mac OS X Automation site.
Automate Microsoft Office
Microsoft Office—which on the Mac comprises Word, Excel, PowerPoint, Outlook, and
OneNote as its main components—is one of the world's best-known software packages.
Microsoft long ago added a programming language to the suite called Visual Basic for
Applications (VBA), which enables users towrite macros that automate Office apps, optionally
embed those macros in documents, and run them (with some limitations) on either OS X
or Windows. Microsoft removed VBA from Office 2008 for Mac, but brought it back again
in Office 2011. Presumably, VBA will be in future versions too. (Microsoft Office also has
excellent AppleScript support, which is an alternative way to accomplish many of the same
tasks.)
Note: In Office 2011 for Mac, only Word, Excel, and PowerPoint support VBA.
Search WWH ::




Custom Search