• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 54. Working with Visual Basic fo... > Controlling an Office Application fr...

Controlling an Office Application from VBA

So far in this chapter, we've focused on the components inside VBA—projects, modules, custom dialog boxes, controls, events, and the like. Ultimately, however, almost every VBA program interacts with the underlying application: For example, you usually write a VBA/Word macro to perform some sort of action on a Word document. That isn't an absolute requirement—you can write a VBA/Excel macro that doesn't interact with any workbooks—but in most cases you will want your program to control the underlying application.

That's where the object model comes in. When a VBA/Word macro controls Word, it does so by using the Word object model. When a VBA/PowerPoint macro changes a slide, it uses the PowerPoint object model.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint