How to test if a font is installed using VBA? -
What is the easiest way to check that a particular font has been installed using VBA?
This vb6 code VBA is compatible with:
function fonts installed (sFont as String) in the form of bullion "this reference must be fixed by default" 'Tools' & gt; Reference & gt; OLE Automation Dim Resume Error as STF Font as Newfold New Set NewFont = NewFont with New Stant Font 'Assign Proposed Font Name' if the font does not exist, will not be assigned .name = sFont ' Returns correct if font assignment succeded FontIsInstalled = (StrComp SFont, .name, vbTextCompare) = 0) 'Return the actual fonts name through arguments sFont =. End End End Function
Comments
Post a Comment