Font.DiacriticColor Property (Publisher)

Returns a ColorFormat object representing the 24-bit color used for diacritics in a right-to-left language publication.

Syntax

expression. DiacriticColor

expression A variable that represents a Font object.

Return Value

ColorFormat

Example

This example tests the text in the first story of the current publication to see if its color is red and it is formatted right-to-left.

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