O'Reilly logo

Writing Word Macros, Second Edition by Steven Roman PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. The List Object

In this chapter:

  • List Types

  • The List Object

  • The ListTemplate Object and ListGalleries

  • Example: Looking at Lists

Lists play an important role in Word documents, and the Word object model contains objects that give the programmer very powerful control over lists. Figure 17-1 shows most of these objects, which are children of the Document object. The List-Gallery object and ListGalleries collection, which are children of the Application object, are not shown.

List-related objects

Figure 17-1. List-related objects

The Word object model is a bit confusing when it comes to lists, partly because the Help documentation is decidedly nonpedagogic. To help clarify the situation, I will begin with a few remarks about lists.

List Types

There are three types of lists in Microsoft Word: single-level bulleted, single-level numbered, and multilevel outline-numbered. The term outline-numbered is a bit misleading, since an outline-numbered list can use either bullets or numbers (and need not include any numbers). Nonetheless, this is Microsoft’s term, so I will use it as well.

In the case of numbered lists (single-and multilevel), there are options to either restart the numbering or continue the numbering started in a previous list. If there is text between the list you are creating and a previous list, then Word will default to new numbering. If not, Word will continue the numbering from the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required