Edytuj

Udostępnij za pośrednictwem


_Font Interface

Definition

This is a primary interface in a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this primary interface only when the method you want to use shares the same name as an event of the COM object; in this case, cast to this interface to call the method, and cast to the latest events interface to connect to the event. Otherwise, use the .NET interface that is derived from the COM coclass to access methods, properties, and events of the COM object. For information about the COM object, see Font.

public interface class _Font
[System.Runtime.InteropServices.Guid("00020952-0000-0000-C000-000000000046")]
public interface _Font
type _Font = interface
Public Interface _Font
Derived
Attributes

Properties

AllCaps

True if the font is formatted as all capital letters. Returns True, False, or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle (reverses the current setting). Read/write Integer.

Animation

This object, member, or enumeration is deprecated and is not intended to be used in your code.

Application

Returns a Application object that represents the Microsoft Word application.

Bold

True if the font or range is formatted as bold. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

BoldBi

True if the font or range is formatted as bold. Returns True, False or wdUndefined (for a mixture of bold and non-bold text). Can be set to True, False, or wdToggle. Read/write Integer.

Borders

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

Color

Returns or sets the 24-bit color for the specified Font object.

ColorIndex

Returns or sets the color for the specified Border or Font object.

ColorIndexBi

Returns or sets the color for the specified Font object in a right-to-left language document.

ContextualAlternates

Specifies whether or not contextual alternates are enabled for the specified font.

Creator

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

DiacriticColor

Returns or sets the 24-bit color to be used for diacritics for the specified Font object. Can be any valid WdColor constant or a value returned by Visual Basic's RGB function. Read/write.

DisableCharacterSpaceGrid

True if Microsoft Word ignores the number of characters per line for the corresponding Font object. Read/write Boolean.

DoubleStrikeThrough

True if the specified font is formatted as double strikethrough text. Returns True, False, or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Duplicate

Returns a read-only Font object that represents the character formatting of the specified font.

Emboss

True if the specified font is formatted as embossed. Returns True, False, or wdUndefined. Can be set to True, False, or wdToggle. Read/write Integer.

EmphasisMark

Returns or sets the emphasis mark for a character or designated character string.

Engrave

True if the font is formatted as engraved. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Fill

Gets a FillFormat object that contains fill formatting properties for the font used by the specified range of text.

Glow

Gets a GlowFormat object that represents the glow formatting for the font used by the specified range of text.

Hidden

True if the font is formatted as hidden text. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Italic

True if the font or range is formatted as italic. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

ItalicBi

True if the font or range is formatted as italic. Returns True, False or wdUndefined (for a mixture of italic and non-italic text). Can be set to True, False, or wdToggle. Read/write Integer.

Kerning

Returns or sets the minimum font size for which Microsoft Word will adjust kerning automatically. Read/write Single.

Ligatures

Gets or sets the ligatures setting for the specified Font object.

Line

Gets a LineFormat object that specifies the formatting for a line.

Name

Returns or sets the name of the specified object. Read/write String.

NameAscii

Returns or sets the font used for Latin text (characters with character codes from 0 (zero) through 127). Read/write String.

NameBi

Returns or sets the name of the font in a right-to-left language document. Read/write String.

NameFarEast

Returns or sets an East Asian font name. Read/write String.

NameOther

Returns or sets the font used for characters with character codes from 128 through 255. Read/write String.

NumberForm

Returns or sets the number form setting for an OpenType font.

NumberSpacing

Gets or sets the number spacing setting for a font.

Outline

True if the font is formatted as outline. Returns True, False, or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Parent

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

Position

Returns or sets the position of text (in points) relative to the base line. A positive number raises the text, and a negative number lowers it. Read/write Integer.

Reflection

Gets a ReflectionFormat object that represents the reflection formatting for a shape.

Scaling

Returns or sets the scaling percentage applied to the font. This property stretches or compresses text horizontally as a percentage of the current size (the scaling range is from 1 through 600). Read/write Integer.

Shading

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

Shadow

True if the specified font is formatted as shadowed. Can be True, False, or wdUndefined. Read/write Integer.

Size

Returns or sets the font size in points. Read/write Single.

SizeBi

Returns or sets the font size in points. Read/write Single.

SmallCaps

True if the font is formatted as small capital letters. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Spacing

Returns or sets the spacing (in points) between characters. Read/write Single.

StrikeThrough

True if the font is formatted as strikethrough text. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

StylisticSet

Gets or sets the stylistic set for the specified font.

Subscript

True if the font is formatted as subscript. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Integer.

Superscript

True if the font is formatted as superscript. Returns True, False or wdUndefined (a mixture of True and False). Can be set to True, False, or wdToggle. Read/write Long.

TextColor

Gets a ColorFormat object that represents the color for the specified font.

TextShadow

Gets a ShadowFormat object that specifies the shadow formatting for the specified font.

ThreeD

Gets a ThreeDFormat object that contains 3-D effect formatting properties for the specified font.

Underline

Returns or sets the type of underline applied to the font. Read/write WdUnderline.

UnderlineColor

Returns or sets the 24-bit color of the underline for the specified Font object.

Methods

Grow()

Increases the font size to the next available size. If the selection or range contains more than one font size, each size is increased to the next available setting.

Reset()

Removes manual character formatting (formatting not applied using a style).

SetAsTemplateDefault()

Sets the specified font formatting as the default for the active document and all new documents based on the active template. The default font formatting is stored in the Normal style.

Shrink()

Decreases the font size to the next available size.

Applies to