Message-ID: <1041744928.7937.1711626885754.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7936_228137089.1711626885754" ------=_Part_7936_228137089.1711626885754 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The NamedStyle class represents = a named style, such as "Normal", "Heading 1", etc., tha= t is embedded in a Word document.
=20<p> public sealed class NamedStyle</p>=20
<p>Public NotInheritable Class NamedStyle</p>=20
You cannot create a new named style programmatically. You can only work = with Named Styles that are in an existing document. You can obtain an insta= nce of this class from the Document.Styles collection. You can apply a style to differen= t sections and elements within your document. You cannot, however, modify a= named style using WordWriter.
=20The following sample retrieves a copy of the Heading 1 style and applies= it to a new paragraph.
=20NamedStyle heading1Style =3D doc.Styles[NamedStyle.BuiltIn.Headin= g1]; Paragraph p =3D doc.InsertParagraphAfter(heading1Style);=20
Dim heading1Style As NamedStyle =3D doc.Styles(NamedStyle.BuiltIn= .Heading1) Dim p As Paragraph =3D doc.InsertParagraphAfter(heading1Style)=20
Name | =20
Description | =20
---|---|
=20 | Returns a NamedStyle.BuiltIn object that represents the culture-independent= name of this style. This is only useful for built-in styles that come with= Word. Any custom styles will return UserDefined. | =20
=20 | Returns a Font object that is a copy of this style's font. Some style types do= not have character formatting. In these cases, this method returns null.= td>=20 |
=20 | Returns a String representing the n=
ame of this NamedStyle. | =20
=20 | Returns a ParagraphFormatting object that is a copy of this style's paragr= aph formatting. Some style types do not have paragraph formatting. In these= cases, this method returns null. | =20
=20 | Returns a NamedStyle.Type object that represents the type of this style. Word = 2003 supports four style types: Character, Paragraph, Table, and List. Olde= r versions support fewer than this. | =20
=20 | Returns a TableFormatting object that is a copy of this style's table formatti= ng. Some style types do not have table formatting. In these cases, this met= hod returns null. | =20