I'm sure this is really simple for those who know, but I'm having some trouble as I'm a week old with VBS and with using VBA to run Shell functions.
I need to rewrite this VBS into VBA format for an Access 2007 application.
Its function: to install an existing font from the application's working folder (not WinDir\Fonts)
O/S: All installed machines (now and future) will be Windows 7 or higher.
1. All referenced variables, like WSHshell, are declared earlier in the VBA Sub.
2. "Cup" is standard for this app and used throughout.
3. The font already exists in the Working Folder (see objFolder - where the FE lives)
set wshShell = CreateObject ("WScript.Shell")
Cup = wshShell.ExpandEnvironmentStrings("%UserProfile%")
set objShell = CreateObject("Shell.Application")
set objFolder = objShell.Namespace(Cup & "\AppData\Roaming\Cinereo\")
set objFolderItem = objFolder.ParseName("CINEREO.TTF")
set objShell = nothing
set wshShell = nothing
Thanks to everyone who even takes a look. Your interest is appreciated.