Font.DiacriticColor 属性 (Publisher)

返回一个 ColorFormat 对象,该对象代表在从右向左书写的语言的出版物中音调符号使用的 24 位颜色。

语法

表达式DiacriticColor

表达 一个代表 Font 对象的变量。

返回值

ColorFormat

示例

本示例测试当前出版物的第一篇文章中的文本,以确定其颜色是否为红色以及其格式是否为从右到左。

Sub FontDiColor() 
 
 Dim fntDiColor As Font 
 
 Set fntDiColor = Application.ActiveDocument. _ 
 Stories(1).TextRange.Font 
 
 If fntDiColor.UseDiacriticColor = msoTrue And _ 
 fntDiColor.DiacriticColor.RGB = RGB(255, 0, 0) Then 
 MsgBox "Your text is red" 
 Else 
 MsgBox "This is not a right-to-left language" _ 
 & " or your color is not red" 
 End If 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。