Office Objects and Object Models
Each Microsoft® Office XP application contains a powerful set of tools designed to help you accomplish a related set of tasks. For example, Microsoft® Access provides powerful data-management and query capabilities, Microsoft® Excel provides mathematical, analytical, and reporting tools, Microsoft® Outlook® provides tools for sending and receiving e-mail, for scheduling, and for contact and task management, and Microsoft® Word makes it possible for you create and manage documents, track versions of documents among different users, and create forms and templates. As powerful as these and the other Office applications are on their own, you also can integrate the features from two or more Office applications into a single solution to amplify and focus users' productivity.
The key technology that makes individual Office applications programmable and makes creating an integrated Office solution possible is the Component Object Model (COM) technology known as automation.
Automation makes it possible for a developer to use Microsoft® Visual Basic® for Applications (VBA) code to create and control software objects exposed by any application, dynamic-link library (DLL), or Microsoft® ActiveX® control that supports the appropriate programmatic interfaces. VBA and automation make it possible for you to program individual Office applications, as well as to run other applications from within a host application. For example, you can run a hidden instance of Excel from within Access to perform mathematical and analytical operations on your Access data. The key to understanding automation is to understand objects and object models: what they are, how they work, and how they work together.
Note To master the use of automation in your Office solutions, you must have a detailed working knowledge of the applications you are integrating. That is the kind of knowledge and experience that can be gained only with further application-specific training and hands-on experience.
In This Section
- Integrated Office Solution Development
- Use the COM software architecture or VBA to develop an integrated Office solution.
- Objects, Collections, and Object Models: Technology Backgrounder
- Understand how to reference objects in an application's object model and how to use the objects and features available to build your solution.
- Office Application Automation
- Learn how to automate one Office application from another.
- Developing Office Solutions Using VBA
- Create Office solutions that can range from writing a simple VBA procedure to creating a sophisticated financial analysis and reporting application
- The Benefits of Office Programmability
- Quickly and easily build and deploy custom desktop solutions and take advantage of the objects exposed by Office applications, so your custom applications can leverage existing, proven, and tested Office functionality.
- Working with Office Applications
- Take advantage of different objects, collections of objects, properties, methods, and events to build your solution.
- Working with Shared Office Components
- Search for files, use the Office Assistant, manipulate command bars, read and write document properties, read and write script, and hook add-ins to your Office solution using a set of shared objects available in all Office applications.
- Getting the Most Out of Visual Basic for Applications
- Write code that is fast, efficient, easy to read and maintain, and, if possible, reusable with a solid working knowledge of Visual Basic for Applications (VBA) — what features the language includes and what you can do with it.
- Add-ins, Templates, Wizards, and Libraries
- Create and use COM Add-in objects (a shared Office component in the Microsoft Office XP object library).