Previous Document Next Document
FontList.Item

Property Item(Index As Long) As String

Member of FontList

The Item property returns the name of the specified font.

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

The Item property returns a read-only value.

Parameters
Description
Index
Specifies the font by its index number

The following code example checks if the Arial font is installed on the computer:

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 2007 Corel Corporation. All rights reserved.