Object Model Reference : Classes : F : FontList : Properties : FontList.Item |
Property Item(Index As Long) As String
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.
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 |
Copyright 2013 Corel Corporation. All rights reserved.