Sets the font for the specified character block of the shape's text.
Applies to: Shape object
object.SetCharFont ( iFrom, iTo, iFont ) |
The SetCharFont method syntax has these parts:
Part | Description |
object | Required. An expression that returns a Shape object. |
iFrom | Required. An expression that returns a Long value. The index of the first character in the character block. |
iTo | Required. An expression that returns a Long value. The index of the last character in the character block. |
iFont | Required. An expression that returns a Long value. A font index in the font collection of the document which owns the object shape. |
Note, that if the character block doesn't include the character block within the iFrom to iTo range, the SetCharFont method adds a new character block and sets the specified font to it.
The value of iFont must be greater than or equal to 1 and less than or equal to the number of the fonts in the font collection of the document. To find out the number of fonts in the document, use the FontsNum method.