CharProps 属性 (Visio)Characters.CharProps property (Visio)

字符对象的字符属性设置为新值。Sets a character property of a Characters object to a new value. 只写。Write-only.


表达式CharProps(CellIndex)expression.CharProps (CellIndex)

_表达式_一个返回一个**字符** 对象的表达式。expression An expression that returns a Characters object.


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
CellIndexCellIndex 必需Required IntegerInteger 要设置的字符部分中的单元格的索引。The index of the cell in the Character section to set. 有关可能值,请参见备注。See Remarks for possible values.

返回值Return value



根据文本范围的范围和格式, 设置CharProps属性可能会导致在形状的字符 ShapeSheet 部分中添加或删除行。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.

CharProps属性是只写属性。The CharProps property is a write-only property. 要检索 Characters 对象的格式属性,请使用 CharPropsRow 属性。To retrieve formatting properties of a Characters object, use the CharPropsRow property.

CellIndex 参数的值对应于 ShapeSheet 窗口的字符部分中的单元格, 而CharProps属性的值对应于可在这些单元格中输入的值。The values of the CellIndex argument correspond to cells in the Character section of the ShapeSheet window, and the values of the CharProps property correspond to the values that can be entered in those cells.

CellIndex 和CharProps属性值的常量是在 Visio 类型库中的VisCellIndices中声明的。Constants for CellIndex and for the CharProps property value are declared in the Visio type library in VisCellIndices.

* * CellIndex * *** CellIndex** * * 值 * *** Value** ** intExpression**** intExpression** * * 值 * *** Value**
visCharacterFontvisCharacterFont 00 代表安装在系统上的 Fonts 集合中的索引的整数。An integer that represents an index into the Fonts collection installed on a system. 零 (0) 代表默认字体。Zero (0) represents the default font. 不适用N/A
visCharacterColorvisCharacterColor 11 与当前调色板中的颜色对应的 0 到 23 之间的整数。An integer from 0 to 23 that corresponds to a color in the current color palette. 不适用N/A
visCharacterStylevisCharacterStyle 双面2 visBold****visItalic****visUnderLine****visSmallCapsvisBold visItalic visUnderLine visSmallCaps &H1 &H2 &H4 &H8&H1 &H2 &H4 &H8
visCharacterCasevisCharacterCase 第三章3 visCaseNormal****visCaseAllCaps****visCaseInitialCapsvisCaseNormal visCaseAllCaps visCaseInitialCaps 0 1 20 1 2
visCharacterPosvisCharacterPos 44 visPosNormal****visPosSuper****visPosSubvisPosNormal visPosSuper visPosSub 0 1 20 1 2
visCharacterSizevisCharacterSize 7 表示磅值的整数。An integer that represents point size. 不适用N/A
visCharacterColorTransvisCharacterColorTrans ×17 与文字颜色的透明度对应的 0 到 100 之间的整数(以百分比表示)。An integer from 0 to 100 that corresponds to the degree of transparency of the text color, as a percentage. 不适用N/A
visCharacterDblUnderlinevisCharacterDblUnderline utf-88 BooleanBoolean 不适用N/A
visCharacterFontScalevisCharacterFontScale 55 0到655之间的一个整数, 表示文本字体的宽度, 以百分比表示, 相对于默认值 (100%)。An integer from 0 to 655 that represents the width of the text font, as a percentage, relative to the default (100%). 不适用N/A
visCharacterLangIDvisCharacterLangID 5757 一个Long , 表示文本所处的语言。A Long that represents the language the text is in. 字符的语言标识符 (LANGID) 是一个由 Windows 定义的 16 位值,它由主要语言标识符和辅助语言标识符组成。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. 要确定特定语言的值,请参阅 MSDN 上的 Platform SDK 文档。To determine the value for particular languages, see the Platform SDK documentation on MSDN. 不适用N/A
visCharacterLetterspacevisCharacterLetterspace 16 表示相邻字母之间附加的空间的整数,以磅为单位。An integer that represents additional space between adjacent letters, in points. 不适用N/A
visCharacterOverlinevisCharacterOverline 9 BooleanBoolean 不适用N/A
visCharacterStrikethruvisCharacterStrikethru 10 10 BooleanBoolean 不适用N/A

如果您的 Visual Studio 解决方案包含Microsoft. Visio参考, 则此属性映射到以下类型:If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this property maps to the following types:

  • IVCharacters _CharProps 中设置的Microsoft.Office.Interop.Visio.IVCharacters.set_CharProps

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.