|
Programmer's Reference >
WordApplication API >
ListLevel
The ListLevel Object
This class is used to manipulate settings for a particular indent level. Things such as number and bullet text and indent change with each indent level in Word. You cannot create a new ListLevel object using the new keyword. To get an instance of the ListLevel class, use the GetLevel() method of the List class, passing it the index of the level you want to retrieve. To get an existing list entry, use the getEntry() method of the List class. getEntry accepts a parameter that represents the index of the entry to retrieve. The following sample demonstrates how to get a ListLevel object for level 2 of a list.
Examples:
[csharp]
// Get the second level settings of a list
WordApplication app = new WordApplication();
Document doc = app.Open(@"C:\sample.doc");
List lst = doc.Lists[0];
ListEntry entry = lst.GetLevel(2);
[vbnet]
' Get the second level settings of a list
Dim app As New WordApplication()
Dim doc As Document = app.Open("C:\sample.doc")
Dim lst As List = doc.Lists(0)
Dim level As ListLevel = lst.GetLevel(2)
ListLevel Properties
| Property |
Type |
Access |
Description |
| BulletText |
void
|
write |
Sets the bullet text that will be displayed at the current list level
|
| Indent |
int
|
read write |
Sets or returns an int that represents the indentation for the body of the entry, in twips
|
| NumberFormat |
WordNumberFormat
|
read write |
Sets or returns a WordNumberFormat object that represents the format for list numbers for this list level
|
| NumberIndent |
int
|
read write |
Sets or returns an int that represents the indent for the first line of the entry in twips
|
This object does not have any methods defined.

Copyright 2007 © SoftArtisans, Inc. All Rights Reserved.
|