Message-ID: <222707476.2275.1710827288545.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2274_1939354406.1710827288545" ------=_Part_2274_1939354406.1710827288545 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ListEntry

ListEntry

Description

=20

This class is used to represent an entry in a List inside a Word documen= t. A list entry in Word is basically a numbered paragraph.

=20
C#
=20
 public sealed class ListEntry : Paragraph
=20
=20
vb.net
=20
Public NotInheritable Class ListEntry
=09=09Inherits Paragraph
=20
=20

Remarks

=20

The following sample gets the first ListEntry object of a List.

=20

To create a new list entry, use List.AddEntry(). To get an existing list e= ntry, use Element.GetElements(Element.Type.ListEntry) to get all elements of = type ListEntry.

=20

Examples

=20

The following sample demonstrates how to create a new list entry at the = end of a list as well as how to get the first list entry of an existing lis= t.

=20
C#
=20

          //--- Create a new list with a new list entry
          WordApplication app =3D new WordApplication();
          Document doc =3D app.Create();
          List lst =3D doc.InsertListAfter(true);
          lst.AddEntry(0);
          lst.InsertTextAfter("First list entry.", false);

          //--- Get the first list entry of an existing list
          WordApplication app =3D new WordApplication();
          Document doc =3D app.Open(@"C:\sample.doc");
          ListEntry entry =3D
               (ListEntry)doc.GetElements(Element.Type.ListEntry)[0];
        
=20
=20
vb.net
=20

          '--- Create a new list with a new list entry
          Dim app As New WordApplication()
          Dim doc As Document =3D app.Create()
          Dim lst As List =3D doc.InsertListAfter(True)
          lst.AddEntry(0)
          lst.InsertTextAfter("First list entry.", False)

          '--- Get the first list entry of an existing list
          Dim app As New WordApplication()
          Dim doc As Document =3D app.Open("C:\sample.doc")
          Dim entry As ListEntry =3D _
               doc.GetElements(Element.Type.ListEntry)(0)
        
=20
=20

Properties

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

BulletText

Sets or returns a String representi= ng the bullet text of this entry as it would show up if it was opened in Wo= rd.

= LevelNum

Sets or returns an int representing= the indent level for this list entry.
=20

Methods

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

RestartNumbering()

Sets the number of this list entry to "1&qu= ot; and renumbers all subsequent entries in the List. This method splits the current ListEntry and all subsequent l= ist entries into a new List.
------=_Part_2274_1939354406.1710827288545--