Message-ID: <864735434.9341.1711688642696.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9340_1444143804.1711688642696" ------=_Part_9340_1444143804.1711688642696 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Represents a paragraph in the Word document. Technically, a paragraph is= a block of text that ends with a carriage return.
=20public class Paragraph : Element=20
Public Class Paragraph =09=09Inherits Element=20
Document
inherits from the=20
Element class.=20
//--- Insert a paragraph at the end of a new document and add som= e sample text WordApplication app =3D new WordApplication(); Document doc =3D app.Create(); Paragraph paragraph =3D doc.InsertParagraphAfter(null); paragraph.InsertTextAfter("This is a new paragraph."); //--- Get the first paragraph of an existing document WordApplication app =3D new WordApplication(); Document doc =3D app.Open(@"C:\sample.doc"); Paragraph firstParagraph =3D doc.Elements(Element.Type.Paragraph)= [0];=20
'--- Insert a paragraph at the end of a new document and add some= sample text Dim app As New WordApplication() Dim doc As Document =3D app.Create() Dim parargraph As Paragraph =3D doc.InsertParagraphAfter(Nothing) paragraph.InsertTextAfter("This is a new paragraph.") '--- Get the first paragraph of an existing document Dim app As New WordApplication() Dim doc As Document =3D app.Open("C:\sample.doc") Dim blocks() As BlockElements =3D doc.BlockElements Dim firstParagraph As Paragraph =3D doc.Elements(Element.Type.Par= agraph)(0)=20
Name | =20
Description | =20
---|---|
=20 | Sets or returns a ParagraphFormatting object that represents the formattin= g for this paragraph (positioning, line spacing, etc). | =20
=20 | Returns or sets an NamedStyle object that represents the Style of this paragraph.= td>=20 |