FontName (object)

<< Click to Display Table of Contents >>

FontName (object)

Access path: Application à FontNames à Item

 1  Description

A FontName object represents one individual font of the fonts installed in Windows. An individual FontName object exists for each installed font.

 2  Access to the object

The individual FontName objects can be accessed solely through enumerating the elements of the collection FontNames. You can access it through Applications.FontNames.

' Display the name of the first installed font

MsgBox tm.Application.FontNames.Item(1).Name

 

' The same, but shorter, omitting the default properties:

MsgBox tm.FontNames(1)

 3  Properties, objects, collections and methods

Properties:

Name R/O (default property)

Charset

 

Objects:

Application Application

Parent FontNames

Name (property, R/O)

Data type: String

Returns the name of the respective font.

Charset (property, R/O)

Data type: Long (SmoCharset)

Returns the character set of the respective font. The possible values are:

smoAnsiCharset   = 0 ' normal character set

smoSymbolCharset = 2 ' symbol font

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. FontNames.