Controlling Other Applications with

Launching Applications ■ Moving between Applications ■ Controlling Another Application ■ Other Methods of Controlling Applications ■ Understanding Automation ■ Understanding Linking and Embedding ■ Linking and Embedding with VBA ■ COM and Automation ■ Understanding Binding ■ Late Binding ■ Early Binding ■ Establishing a Reference to an Object Library ■ Creating Automation Objects ■ Using the Create-Object Function ■ Creating a New Word Document using Automation ■ Using the GetObject Function ■ Opening an Existing Word Document ■ Using the New Keyword ■ Using Automation to Access Microsoft Outlook ■ What's Next...

Every day, while working on your computer at work or at home, you are using various applications. To find a specific file on your hard drive or a floppy disk, you launch Windows Explorer. When you want to set the system time or change the looks of your screen, you click the appropriate icon in the Control Panel. If you have the Microsoft Office Suite installed on your computer, you use Word to create all sorts of documents and rely on Excel to perform all of your computations. Microsoft Access is great for keeping tables of your very important data, while PowerPoint helps you with sound and graphics. Finally, Microsoft Outlook makes it easy to keep your contacts, schedules, and appointments organized and easy to share with others. While working with these applications, you constantly switch between programs. You may enter data directly by using the keyboard or simply copy or move data between applications. These operations—launching applications and transferring data between them—do not need to be a manual process. These tasks can be automated with some very interesting VBA functions and instructions. In this chapter you will learn various methods of launching applications from your VBA procedures and find out how to control other applications directly from Microsoft Excel by using the technology referred to as Automation.

0 0

Post a comment