Table of contents
TOC
Collapse the table of content
Expand the table of content

Font.GetScriptName Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a String that represents the name of the font script being used in a text range.

Syntax

expression. GetScriptName( Script)

_expression_A variable that represents a Font object.

Parameters

NameRequired/OptionalData TypeDescription
ScriptRequiredPbFontScriptTypeThe script name.

Return Value

String

Remarks

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

Example

This example verifies that the default font script in use for the specified text range is Tahoma and, if not, sets it as the default font script.

Sub GetScript() 
 With ActiveDocument.Pages(1).Shapes(1) _ 
 .TextFrame.TextRange.Font 
 If .GetScriptName(Script:=pbFontScriptDefault) <> "Tahoma" Then 
 .SetScriptName Script:=pbFontScriptDefault, _ 
 FontName:="Tahoma" 
 End If 
 End With 
End Sub
© 2018 Microsoft