Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

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.

Signature
C#
C#
 public sealed class ListLevel
{signature}{signature:
}
Signature
vb.net
vb.net
Public NotInheritable Class ListLevel
{signature}
{remarks}You cannot create a new [ListLevel|ListLevel] object using the {{new}} keyword. To get an instance of the {{ListLevel}} class, use the [GetLevel()|List.GetLevel(Int32)] method of the [List|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.

{remarks}
{example}{code:csharp|title=C#}
Remarks

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.

Example
Code Block
csharp
csharp
titleC#


          //--- 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);
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          '--- 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)
        
{code} {example} {properties} ||Name||Description|| |[BulletText|ListLevel.BulletText]|{excerpt-include:ListLevel.BulletText|nopanel=true}| |[Indent|ListLevel.Indent]|{excerpt-include:ListLevel.Indent|nopanel=true}| |[NumberFormat|ListLevel.NumberFormat]|{excerpt-include:ListLevel.NumberFormat|nopanel=true}| |[NumberIndent|ListLevel.NumberIndent]|{excerpt-include:ListLevel.NumberIndent|nopanel=true}|
Properties

Name

Description

BulletText

Excerpt Include
ListLevel.BulletText
ListLevel.BulletText
nopaneltrue

Indent

Excerpt Include
ListLevel.Indent
ListLevel.Indent
nopaneltrue

NumberFormat

Excerpt Include
ListLevel.NumberFormat
ListLevel.NumberFormat
nopaneltrue

NumberIndent

Excerpt Include
ListLevel.NumberIndent
ListLevel.NumberIndent
nopaneltrue