Finding Objects in the Object Hierarchy

A custom Office application usually starts off by creating the top-level application objects it needs. Each of the Office applications has its own complex object model, and accessing an application's child objects is usually a matter of “burrowing down” through the various layers of the object hierarchy to obtain a reference to the desired object. As you learned earlier in this chapter, collections are an important part of all object hierarchies, which means that accessing an individual object often requires accessing the collection that it belongs to.

VBA provides some shortcut accessors that permit you to access certain objects without having to navigate through the object hierarchy. The use of the shortcut ...

Get Office® XP Development with VBA 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.