On one hand, the Microsoft Word, Excel, and PowerPoint object models are virtually the same in AppleScript and Visual Basic for Applications (VBA), including the names of terms. On the other hand, there are fundamental differences between the AppleScript language and some VBA concepts that necessitate differences in implementation and the way that you write code. These differences are explained in the topics in this section.
When testing scripts in Macintosh Script Editor, it is recommended that you begin each one with an activate command on its own line, just inside the
tell
application "Microsoft Word"
(or
Microsoft Excel
or
Microsoft PowerPoint) block. That brings the application that you are writing the script for to the front so that you can see what is happening.
It is not necessary to include activate when running saved scripts from the Script menu while the active application is in front. There may also be other occasions when you are running a script from elsewhere and you don't want the active application to come to the front. The activate command was generally not included in the sample scripts, but you may want to do so.


