Previous Document Next Document

Object Model Reference : Classes : F : FontList : Properties : FontList.Item


FontList.Item

Property Item(Index As Long) As String

Description

Member of FontList

The Item property returns the name of the specified font.

Item is the default property of the FontList class, and its reference can be omitted when you are accessing items in a FontList collection. For example, FontList.Item(2) is the same as FontList(2) — they both reference the second font object in the collection.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the font by its index number

VBA example

The following VBA example checks whether the Arial font is installed.

Sub Test()
 If Not FontInstalled("Arial") Then
  MsgBox "Font 'Arial' is not installed on your system"
 End If
End Sub
'---- The following function determines if the given font is installed
Private Function FontInstalled(Name As String) As Boolean
 Dim b As Boolean, n As Long
 b = False
 For n = 1 To FontList.Count
  If UCase$(FontList(n)) = UCase$(Name) Then
   b = True
   Exit For
  End If
 Next n
 FontInstalled = b
End Function

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.