Programming Word

Working with Documents 115

Working with Text 124

Working with the Range Object 125

Using the Selection Object 129

Using the Words Object 132

Working with the Sentences Object ____133

Programming the Paragraph Object____136

Microsoft Word is a large, complex program, so it will come as no surprise that its list of objects is equally big and complicated. Fortunately, just as most people use only a tiny subset of Word's features, so too will you probably only use just a few of Word's objects in your VBA programming. In fact, with Word there are only really three levels of objects you'll need to worry about most of the time: Word itself, which is represented by the Application object; Word documents, which are represented by the Document object; and the text within those documents, which are represented by various objects, including Range, Selection, Sentence, and Paragraph. In this chapter you'll focus on programming these basic objects.

0 0

Post a comment