TextStyleKeepFmt 属性 (Visio)Selection.TextStyleKeepFmt property (Visio)

为对象应用某文字样式,同时保留局部格式设置。Applies a text style to an object while preserving local formatting. 读/写。Read/write.


expressionexpression. TextStyleKeepFmt

_表达式_一个代表**Selection** 对象的变量。expression A variable that represents a Selection object.

返回值Return value



将样式设置为不存在的样式会生成一个错误。Setting a style to a nonexistent style generates an error. 将一种样式设置为现有样式的另一种类型 (例如, 将TextStyleKeepFmt属性设置为填充样式) 不执行任何操作。Setting one kind of style to an existing style of another kind (for example, setting the TextStyleKeepFmt property to a fill style) does nothing. 将一种样式设置为一种具有多个属性集的现有样式仅更改该组件的属性(例如,将 TextStyleKeepFmt 属性设置为具有线条、文字和填充属性的样式仅更改文字属性)。Setting one kind of style to an existing style that has more than one set of attributes changes only the attributes for that component (for example, setting the TextStyleKeepFmt property to a style that has line, text, and fill attributes changes only the text attributes).

从 Visio 2002 开始, 将TextStyleKeepFmt设置为空字符串 ("") 将导致主控形状的样式重新应用于所选内容或形状。Beginning with Visio 2002, setting TextStyleKeepFmt to an empty string ("") will cause the master's style to be reapplied to the selection or shape. (早期版本生成 "无此类样式" 异常。)如果所选内容或形状没有主控形状, 则其样式保持不变。(Earlier versions generate a "no such style" exception.) If the selection or shape has no master, its style remains unchanged.

支持和反馈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.