View Single Post
 
Old 07-19-2023, 11:07 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What you have been told may simply mean that by default the Office templates folder is a hidden user folder. It can be accessed by entering (on the user's PC)
%appdata%\Microsoft\Templates
in the Windows File Explorer Address bar and pressing Enter.

Or from VBA
Code:
Dim sPath As String
sPath = Environ("APPDATA") & "\Microsoft\Templates\"
Thus you can copy a template from its current location to the required location on a given user's PC using a macro e.g.
Code:
Sub CopyTemplate()
Const sTemplatePath As String = "C:\Path\" 'The location of the template to be copied
Const sTemplateName As String = "TemplateName.oft" 'The filename of the template
Dim oFSO As Object
Dim sPath As String
    sPath = Environ("APPDATA") & "\Microsoft\Templates\"
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    oFSO.CopyFile sTemplatePath & sTemplateName, sPath & sTemplateName, True
End Sub
It would be possible to change the templates folder to a different location, but given your comments, that might prove even more problematic for you.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote