Style Style Style Interface

Definition

Represents a single built-in or user-defined style.

public interface class Style
[System.Runtime.InteropServices.Guid("0002092C-0000-0000-C000-000000000046")]
public interface Style
Public Interface Style
Attributes

Remarks

The Style object includes style attributes (font, font style, paragraph spacing, and so on) as properties of the Style object. The Style object is a member of the Styles collection. The Styles collection includes all the styles in the specified document.

Use Styles(index), where index is the style name, a WdBuiltinStyle constant or index number, to return a single Style object. You must exactly match the spelling and spacing of the style name, but not necessarily its capitalization.

The style index number represents the position of the style in the alphabetically sorted list of style names.

To apply a style to a range, paragraph, or multiple paragraphs, set the Style property to a user-defined or built-in style name.

Use the OrganizerCopy(String, String, String, WdOrganizerObject) method to copy styles between documents and templates. Use the UpdateStyles() method to update the styles in the active document to match the style definitions in the attached template. Use the OpenAsDocument() method to open a template as a document so that you can modify the template styles.

Properties

Application Application Application

Returns a Application object that represents the Microsoft Word application.

AutomaticallyUpdate AutomaticallyUpdate AutomaticallyUpdate

True if the style is automatically redefined based on the selection. False if Microsoft Word prompts for confirmation before redefining the style based on the selection. Read/write Boolean.

BaseStyle BaseStyle BaseStyle

Returns or sets an existing style on which you can base the formatting of another style. Read/write Object.

Borders Borders Borders

Returns a Borders collection that represents all the borders for the specified object.

BuiltIn BuiltIn BuiltIn

True if the specified object is one of the built-in styles or caption labels in Microsoft Word. Read-only Boolean.

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Integer.

Description Description Description

Returns the description of the specified style. Read-only String.

Font Font Font

Returns or sets a Font object that represents the character formatting of the specified object. Read/write Font.

Frame Frame Frame

Returns a Frame object that represents the frame formatting for the specified style. Read-only.

Hidden Hidden Hidden

Reserved for internal use.

InUse InUse InUse

True if the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. Read-only Boolean.

LanguageID LanguageID LanguageID

Returns or sets the language for the specified object. Read/write.

LanguageIDFarEast LanguageIDFarEast LanguageIDFarEast

Returns or sets an East Asian language for the specified object.

Linked Linked Linked

Returns or sets a Boolean that represents whether a style is a linked style that can be used for both paragraph and character formatting. Read-only.

LinkStyle LinkStyle LinkStyle

Sets or returns an Object that represents a link between a paragraph and a character style. Read/write.

ListLevelNumber ListLevelNumber ListLevelNumber

Returns the list level for the specified style. Read-only Integer.

ListTemplate ListTemplate ListTemplate

Returns a ListTemplate object that represents the list formatting for the specified Style object.

Locked Locked Locked

True if the specified style is locked.

NameLocal NameLocal NameLocal

Returns the name of a built-in style in the language of the user. Read/write String.

NextParagraphStyle NextParagraphStyle NextParagraphStyle

Returns or sets the style to be applied automatically to a new paragraph inserted after a paragraph formatted with the specified style. Read/write Object.

NoProofing NoProofing NoProofing

True if the spelling and grammar checker ignores text formatted with this style. Read/write Integer.

NoSpaceBetweenParagraphsOfSameStyle NoSpaceBetweenParagraphsOfSameStyle NoSpaceBetweenParagraphsOfSameStyle

True for Microsoft Word to remove spacing between paragraphs that are formatted using the same style. Read/write Boolean.

ParagraphFormat ParagraphFormat ParagraphFormat

Returns or sets a ParagraphFormat object that represents the paragraph settings for the specified style. Read/write.

Parent Parent Parent

Returns an object that represents the parent object of the specified object.

Priority Priority Priority

Returns or sets a Integer that represents the priority for sorting styles in the Styles task pane. Read/write.

QuickStyle QuickStyle QuickStyle

Returns or sets a Boolean that represents whether the style corresponds to an available quick style. Read/write.

Shading Shading Shading

Returns a Shading object that refers to the shading formatting for the specified object.

Table Table Table

Returns a TableStyle object representing properties that can be applied to a table using a table style.

Type Type Type

Returns the style type. Read-only Style.

UnhideWhenUsed UnhideWhenUsed UnhideWhenUsed

Set True to clear the Hidden property when this style is used.

Visibility Visibility Visibility

Reserved for internal use.

Methods

Delete() Delete() Delete()

Deletes the specified object.

LinkToListTemplate(ListTemplate, Object) LinkToListTemplate(ListTemplate, Object) LinkToListTemplate(ListTemplate, Object)

Links the specified style to a list template so that the style's formatting can be applied to lists.

Applies to