Message-ID: <1909791386.2203.1710822262463.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2202_593236680.1710822262448" ------=_Part_2202_593236680.1710822262448 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This class is used to represent a cursor position in the document. It si= ts between two characters and its position is represented as the index of t= he character it sits behind. A Position= a> object can be obtained from an Element<= /a>.
=20public sealed class Position=20
Public NotInheritable Class Position=20
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
The following sample gets a Position
object from the start =
of a Document
.
WordApplication app =3D new WordApplication(); Document doc =3D app.Create(); Position pos =3D doc.GetPosition(0);=20
Dim app As New WordApplication() Dim doc As Document =3D app.Create() Dim pos As Position =3D doc.GetPosition(0)=20
Name | =20
Description | =20
---|---|
=20 | Returns an int that represents the =
absolute position in the document. | =20
Name | =20
Description | =20
---|---|
=20 | Creates and returns a Hyperlink at this Position. This hyperlink will have the speci= fied url and displayed text. | =20
=20 | Inserts and returns an InlineImage at the point represented by this Position. The = image that is inserted is specified by a fileName string. | =20
=20 | Inserts and returns an InlineImage at the point represented by this Position. The = image that is inserted is specified by a Stream object. | =20
=20 | Creates and returns an empty List at the point represented by this Position. By passing a= boolean, it can be a numbered list (true) or a bulleted list (false). | = =20
=20 | Creates and returns a MergeField at this Position. This merge field will have the s= pecified name and contents. | =20
=20 | Creates and returns an empty Paragraph at the point represented by this Position, fo= rmatted with the specified style. If this Position is in the middle of a pa= ragraph the containing paragraph will be split. | =20
=20 | Creates and returns an empty Section at the point represented by this Position. If thi= s Position is in the middle of a section then the containing section will b= e split. | =20
=20 | Creates and returns a Table at the point represented by this Position. The table will co= ntain the specified number of rows and columns. | =20
=20 | Creates and returns a CharacterRun at the point represented by this Position. The= text to be inserted is specified as well as whether this should be a new c= haracter run or part of the previous one. | =20