Introduction to the Word Object ModelRegardless of the approach you choose to integrate your code with Word, you will eventually need to talk to the Word object model to get things done. It is impossible to completely describe the Word object model in this book, but we try to make you familiar with the most important objects in the Word object model and show some of the most frequently used methods, properties, and events on these objects. The Object HierarchyThe first step in learning the Word object model is to get an idea of the basic structure of the object model hierarchy. Figure 6-15 shows the most critical objects in the Word object model and their hierarchical relationship. Figure 6-15. The basic hierarchy of the Word object model.The Application object is used to access application-level settings and options. It also is the root object of the object model and provides access to the other objects in the object model. Figure 6-16 shows some of the object model objects associated with the Application object. Figure 6-16. Objects associated with Word's Application object.![]() The Document object represents a Word document. Figure 6-17 shows some of the object model objects associated with the Document object. Figure 6-17. Objects associated with Word's Document object.![]() The Range object represents a range of text within a document. Figure 6-18 shows some of the object model objects associated with the Range object. Figure 6-18. Objects associated with Word's Range object.![]() The Shape object represents a figure, chart, picture, or other object that is embedded in a Word document. Figure 6-19 shows some of the object model objects associated with the Shape object. Figure 6-19. Objects associated with Word's Shape object.![]() ![]() |