TextRange.Script property (Publisher)

Returns a PbFontScriptType constant that represents the font script for a text range. Read-only.

Syntax

expression.Script

expression A variable that represents a TextRange object.

Return value

PbFontScriptType

Remarks

The Script property value can be one of the PbFontScriptType constants declared in the Microsoft Publisher type library.

Example

This example displays a message if the font script used in the specified text range is ASCII Latin. This example assumes that there is at least one shape on the first page of the active publication.

Sub DisplayScriptType() 
 If ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange _ 
 .Script = pbFontScriptAsciiLatin Then 
 MsgBox "The font script you are using is ASCII Latin." 
 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.