List Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a single list format that's been applied to specified paragraphs in a document.
public interface class List
[System.Runtime.InteropServices.Guid("00020992-0000-0000-C000-000000000046")]
public interface List
type List = interface
Public Interface List
- Attributes
Remarks
The List object is a member of the Lists collection.
Use Lists(index
), where index
is the index number, to return a single List object.
To return all the paragraphs that have list formatting, use the ListParagraphs property. To return them as a range, use the Range property.
To apply a different list format to an existing list, use the ApplyListTemplate(ListTemplate, Object, Object) method with the List object. To add a new list to a document, use the ApplyListTemplate(ListTemplate, Object, Object, Object) method with the ListFormat object for a specified range.
Use the CanContinuePreviousList(ListTemplate) method to determine whether you can continue the list formatting from a list that was previously applied to the document.
Use the CountNumberedItems(Object, Object) method to return the number of items in a numbered or bulleted list, including LISTNUM fields.
To determine whether a list contains more than one list template, use the SingleListTemplate property.
You can manipulate the individual List objects within a document, but for more precise control you should work with the ListFormat object.
Picture-bulleted lists are not included in the Lists collection and cannot be manipulated using the List object.
Properties
Application |
Returns a Application object that represents the Microsoft Word application. |
Creator |
Returns a 32-bit integer that indicates the application in which the specified object was created. |
ListParagraphs |
Returns a ListParagraphs collection that represents all the numbered paragraphs in the list. |
Parent |
Returns an object that represents the parent object of the specified object. |
Range |
Returns a Range object that represents the portion of a document that's contained in the specified object. |
SingleListTemplate |
True if the entire list object uses the same list template. |
StyleName |
Returns the name of the style applied to the specified AutoText entry. |
Methods
ApplyListTemplate(ListTemplate, Object, Object) |
Applies a set of list-formatting characteristics to the specified list. |
ApplyListTemplateOld(ListTemplate, Object) |
Reserved for internal use. |
ApplyListTemplateWithLevel(ListTemplate, Object, Object, Object) |
Applies a set of list-formatting characteristics, optionally for a specified level. |
CanContinuePreviousList(ListTemplate) |
Returns a WdContinue constant (wdContinueDisabled, wdResetList, or wdContinueList) that indicates whether the formatting from the previous list can be continued. |
ConvertNumbersToText(Object) |
Changes the list numbers and LISTNUM fields in the specified list to text. |
CountNumberedItems(Object, Object) |
Returns the number of bulleted or numbered items and LISTNUM fields in the specified list. |
RemoveNumbers(Object) |
Removes numbers or bullets from the specified list. |