mustangcoupe
Technical User
I got this from a diffrent froum. I am looking to check the font directory see if my font(3of9) exists and if it dosn't create it... If it does then do nothing...
I dont know shell commands at all... is this the best way to do it is this the correct correct commands/syntax for vba
--Todd
TechnicalUser pretending to be a programmer(shhh… the boss doesn’t know yet)
I dont know shell commands at all... is this the best way to do it is this the correct correct commands/syntax for vba
Code:
Set WSHShell = CreateObject("WScript.Shell")
set FSO = CreateObject("Scripting.FileSystemObject")
sFontName = "sample.ttf"
sFontDescription = "Sample Font (TrueType)"
FSO.Copyfile "c:\" + sFontName, "c:\windows\fonts\" + sFontName
WSHShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\" + sFontDescription, sFontName
--Todd
TechnicalUser pretending to be a programmer(shhh… the boss doesn’t know yet)