Hi folks.
I found this useful code on
Adam Dimech's Coding Blog which checks to see if the User has the required template font installed on their computer and reports with a Message Box.
However, I'd like VBA to check for whatever font has been set in the "Normal" style when creating a new, or opening an existing, document based on the template, rather than specifying a font name in the code.
Quote:
Sub FontCheck()
'
' With thanks to Adam Dimech's Coding Blog (Adam Dimech's Coding Blog)
'
Dim lFound As Boolean
Dim font As Variant
font = "Courier Final Draft" 'This is where I'd like it to check the "Normal" style font
Let lFound = False
For Each aFont In Application.FontNames
If aFont = font Then
Let lFound = True
End If
Next aFont
If lFound = False Then
Call MsgBox("Please install the font '" & font & "' before using this template.", vbExclamation, "Required font missing")
End If
End Sub
|
Thanks in advance, folks.