I am in word 2007 and need to modify a global word template to look to a user’s appdataroamingmicrosofttemplates folder for company specific templates.
I have the following code defining the path
Public Const strForms As String = “c:users%username%appdataroamingmicrosoftTemplatescompanyforms”
I’ve tried to use Environ$(“Appdata”) & “…companyfirms”
%appdata% & “…companyfirms”
Then, the ribbon points to that location to pull the templates
Sub OpenLtr(control As IRibbonControl)
Documents.Add Template:=strForms & “timesheet.dotx”, _
NewTemplate:=False, DocumentType:=0
frmTime Show
Unload frmTime
End Sub
I just can’t figure out how to define the variable for appdata regardless of the user name. The company has an outside tech firm managing their network and insists that I can’t point to c:prog filesmsofficeoffice12templates…. so that is not an option.
Help anyone?
Thx