This class is used to represent a cursor position in the document. It sits between two characters and its position is represented as the index of the character it sits behind. A Position object can be obtained from an Element.

 public sealed class Position
Public NotInheritable Class Position

You cannot create a new Position object using the new keyword. You must get a Position object using the GetPosition() method of the Element class (or the Document class, which inherits from Element ). This method takes a parameter that represents the relative offset from the start of this Element to point at which to get the Position.

The following sample gets a Position object from the start of a Document.


          WordApplication app = new WordApplication();
          Document doc = app.Create();
          Position pos = doc.GetPosition(0);
        

          Dim app As New WordApplication()
          Dim doc As Document = app.Create()
          Dim pos As Position = doc.GetPosition(0)
        

Name

Description

PositionValue

Name

Description

InsertHyperlink(String, String)

InsertImage(String)

InsertImage(System.IO.Stream)

InsertList(Boolean)

InsertMergeField(String, String)

InsertParagraph(NamedStyle)

InsertSection()

InsertTable(Int32, Int32)

InsertText(String, Boolean)