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 determine whether its color is red and if 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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.