Chapter 10. Using Automation to Add Functionality
As much power as Access provides on its own, it doesn't exist in a vacuum. Applications may have requirements to send e-mail to recipients or print custom invoices using Word. When an application grows outside the core functionality of Access, it may be time to start looking at using other applications to help get the job done. By using tools for what they are designed to do and piecing them together, applications turn into solutions. In this chapter, you learn how to use automation to drive other applications to help get the job done. More specifically, you learn the following:
The basics of automation, including the low-level difference between the
CreateObject
andGetObject
functionsHow to automate objects in Windows such as the Windows Shell and the file system
How to automate applications in Office to extend the functionality of your applications beyond Access
How to automate Internet Explorer to integrate the Web into your applications
Automation Basics
The term automation refers to driving another process via code. There are several ways to do this in VBA, ranging from simply launching an application to actually manipulating an application using its object model. We look at both of these techniques in this chapter.
The basis for automation is the Component Object Model (COM), which states that communication with objects happens via their interfaces. Thus, under the hood, automation works by connecting to an interface of a particular ...
Get Expert Access™ 2007 Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.