Share via


CharProps Property [Visio 2003 SDK Documentation]

Sets a character property of a Characters object to a new value.

object**.CharProps**(CellIndex) = intExpression

object     Required. An expression that returns a Characters object.

CellIndex     Required Integer. The index of the cell in the Character section to set. See Remarks for possible values.

intExpression     Required Integer. The new value for the property. See Remarks for possible values.

Version added

3.0

Remarks

Depending on the extent of the text range and the format, setting the CharProps property may cause rows to be added or removed from a shape's Character ShapeSheet section.

The CharProps property is a write-only property. To retrieve formatting properties of a Characters object, use the CharPropsRow property.

The values of the CellIndex argument correspond to cells in the Character section of the ShapeSheet window, and the values of intExpression correspond to the values that can be entered in those cells.

Constants for CellIndex and intExpression are declared in the Visio type library in VisCellIndices.

CellIndex Value intExpression Value

visCharacterFont

0

An integer that represents an index into the Fonts collection installed on a system. Zero (0) represents the default font.

N/A

visCharacterColor

1

An integer from 0 to 23 that corresponds to a color in the current color palette.

N/A

visCharacterStyle

2

visBold
visItalic
visUnderLine
visSmallCaps

&H1
&H2
&H4
&H8

visCharacterCase

3

visCaseNormal
visCaseAllCaps
visCaseInitialCaps

0
1
2

visCharacterPos

4

visPosNormal
visPosSuper
visPosSub

0
1
2

visCharacterSize

7

An integer that represents point size.

N/A

visCharacterColorTrans

17

An integer from 0 to 100 that corresponds to the degree of transparency of the text color, as a percentage.

N/A

visCharacterDblUnderline

8

Boolean

N/A

visCharacterFontScale

5

An integer from 0 to 655 that represents the width of the text font, as a percentage, relative to the default (100%).

N/A

visCharacterLangID

57

A Long that represents the language the text is in. The language ID (LANGID) for a character is a 16-bit value defined by Windows, consisting of a primary language ID and a secondary language ID. To determine the value for particular languages, see the Platform SDK documentation on MSDN.

N/A

visCharacterLetterspace

16

An integer that represents additional space between adjacent letters, in points.

N/A

visCharacterOverline

9

Boolean

N/A

visCharacterStrikethru

10

Boolean

N/A

Applies to | Characters object

See Also | CharPropsRow property | ParaProps property