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

字元物件的字元屬性設定為新值。Sets a character property of a Characters object to a new value. 唯寫的。Write-only.

語法Syntax

運算式CharProps(CellIndex)expression.CharProps (CellIndex)

_運算式_會傳回一個**字元** 物件的運算式。expression An expression that returns a Characters object.

參數Parameters

名稱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

整數Integer

註解Remarks

根據文字範圍的範圍和格式, 設定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. 若要取得字元物件的格式屬性, 請使用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屬性值的常數是在VisCellIndices的 Visio 型別程式庫中宣告。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 0 整數, 代表安裝在系統上的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 一級1 從 0 到 23 的整數,會對應到目前調色盤中的色彩。An integer from 0 to 23 that corresponds to a color in the current color palette. 不適用N/A
visCharacterStylevisCharacterStyle 12 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 4 visPosNormal****visPosSuper****visPosSubvisPosNormal visPosSuper visPosSub 0 1 20 1 2
visCharacterSizevisCharacterSize 77 代表點數大小的整數。An integer that represents point size. 不適用N/A
visCharacterColorTransvisCharacterColorTrans 17 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 8 8 BooleanBoolean 不適用N/A
visCharacterFontScalevisCharacterFontScale 5 從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 16 代表相鄰字母之間額外空間 (以點數表示) 的整數。An integer that represents additional space between adjacent letters, in points. 不適用N/A
visCharacterOverlinevisCharacterOverline 9 9 BooleanBoolean 不適用N/A
visCharacterStrikethruvisCharacterStrikethru 10 10 BooleanBoolean 不適用N/A

如果 Visual Studio 解決方案包含 the the the the the the the the the the the the the the the the the the the the the the the the the the types: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.