UNDERSTANDING AUTOMATION

From Access, Automation allows you, the developer, to link to objects (such as documents, spreadsheets, and so on) from other applications, or embed objects from other applications in forms, reports, or tables, thereby allowing the native application to perform the tasks needed. In this case, Access is the client (also called controller); the other application being driven, such as Word, is the server.

Note

Unfortunately, not all Windows applications can use Automation. In general, those that use DDE can't use Automation. For more information about DDE, see “Driving Other Applications with DDE” later in this chapter.


You can take advantage of Automation in Access in two ways:

  • Through the user interface—You can have an object embedded or linked in a table, and then use that table as a record source for a bound form. When working with these objects, you can get to the server application by double-clicking the bound object.

Tip

When an object is embedded on a form and you double-click, Access performs what's called in-place activation. This allows you to edit a Word document by using Word menus while still in Access.


  • Through Automation—You can use Automation—the method discussed in this chapter—to create an object-type variable and manipulate it by using VBA.

Automation with VBA gives you about as much control as you need in programming objects in other applications. By creating the object variable, the client can use the server's native commands (methods) to perform the necessary functions. Figure 13.1 diagrams a generic Automation session.

Figure 13.1. An Automation client can set up a reference to a server application.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.37.190