ParagraphFormat 属性 (Publisher)ParagraphFormat.TextStyle property (Publisher)

返回或设置一个 variant 类型的值 ,该值代表应用于段落的文字样式。Returns or sets a Variant that represents the text style applied to a paragraph. 读/写。Read/write.



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

返回值Return value



本示例中,如果选定内容的格式不是"Normal"文字样式,将更改选定内容的文字样式。This example changes the text style of the selection if the selection isn't formatted with the Normal text style. 本示例假定已选定当前出版物中的文字。This example assumes that text is selected in the active publication.

Sub SetTextStyle() 
 With Selection.TextRange.ParagraphFormat 
 If .TextStyle <> "Normal" Then _ 
 .TextStyle = "Normal" 
 End With 
End Sub

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