Welcome to MacTech's Guide to Making the Transition from VBA to AppleScript.
In this guide, we'll show you how to get started with your transition, help you through some of the challenges, and speak to you from a "VBA" point of view. In other words, we'll help you to understand AppleScript, and help you to start writing AppleScript as fast as possible. We‘ll do this, in part, by keeping your VBA background uppermost in mind.
While moving from VBA to AppleScript may be a necessity for some, the good news is that there are some advantages as well. The primary difference? AppleScript is the scripting language across the Mac whereas VBA is limited to Word, Excel and PowerPoint. With AppleScript, many other applications, and the Mac itself, will become available to you.
This gives you two benefits. First, once you learn the AppleScript language, that knowledge will apply to many applications. You do need to learn the dictionary for each new application you want to script, but the standard suite, the syntax and the basics are the same throughout. Second, since this is the scripting language across the Mac, you‘ll be able to script many things: Mac OS X, the Finder, Microsoft Office (including Entourage), and FileMaker to name a few. This means that one script can talk to all of these applications, and that the applications can interchange information.
You‘ll also be able to take advantage of any AppleScript development environment, including not only Apple‘s Automator, but also third party tools. The bottom line is that while making any transition is work, there‘s some “goodness” that moving to AppleScript will bring you.
This guide will not only show you the basics of AppleScript, and about scripting Microsoft Office, but we'll also introduce you to the world of AppleScript. We‘ll give you an overview of the AppleScript universe. And, the guide includes a special bonus chapter on using AppleScript in Entourage (which does not have VBA at all). Finally, we‘ll introduce you to a number of other resources that will help you to understand what‘s available in the AppleScript community.
While any technical publication is complex to assemble, and requires a dedicated team, this one stands out as a Herculean effort because it draws on so many different types of expertise. As our “tour guide,” Paul Berkowitz has done an amazing job of bridging the gap here between VBA and AppleScript. And, our experts Jonathan West, John McGimpsey, and Steve Rindsberg have done a wonderful job with their deep VBA understanding and providing VBA examples to transition.
Also, I‘d like to thank our many reviewers around the globe who helped create a high quality document — one that the community can use to make this transition more smoothly and easily. Of course, thank you to Microsoft for their support during this project. Lastly, a big thank you to the MacTech team for all the editing, and production efforts to make this all happen.
Enjoy the guide, and let us know what you think!