Hi,
I've picked out a font that I want a workbook to use, but it's one that isn't installed on every computer (it came out of Office 2007, but my firm uses Office XP and 2003). So my thought was to store the .TTF files on a network drive and check the user's sysroot\fonts\ folder when the workbook opens. If the files aren't there, it'll copy them and reopen the workbook. I had thought this would restore the font, but it doesn't seem to be working. The files copy correctly and the workbook reopens, but it still shows everything in Arial (as if it can't find the correct font). Below is the routine I've created. Any thoughts?
Sub Auto_Open()
Dim fFolder As String
Set fs = CreateObject("Scripting.FileSystemObject")
Set w = fs.GetSpecialFolder(0)
fFolder = w & "\fonts\"
If fs.fileexists(fFolder & "CANDARA.TTF") = False Then
FileCopy "J:\DCS\DATA\123\Daily\Dividend Tracking\Dividend Tracking Archive\candara.ttf", fFolder & "candara.ttf"
FileCopy "J:\DCS\DATA\123\Daily\Dividend Tracking\Dividend Tracking Archive\candarab.ttf", fFolder & "candarab.ttf"
FileCopy "J:\DCS\DATA\123\Daily\Dividend Tracking\Dividend Tracking Archive\candarai.ttf", fFolder & "candarai.ttf"
FileCopy "J:\DCS\DATA\123\Daily\Dividend Tracking\Dividend Tracking Archive\candaraz.ttf", fFolder & "candaraz.ttf"
MsgBox "DispMsg to install font.", vbInformation, "Installing font"
Application.DisplayAlerts = False
Workbooks.Open "J:\DCS\DATA\123\Daily\Dividend Tracking\New Div Master List.xls"
End If
End Sub
Bookmarks