View Single Post
 
Old 03-17-2022, 05:13 AM
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

The following should work for you
Code:
Dim FSO As Object
Dim sDoc As String
    sDoc = Environ("USERPROFILE") &  "\Regulatory - Templates\Toolbar.dotm"
    'MsgBox sDoc
    Set FSO = CreateObject("Scripting.FileSystemObject")

    If FSO.FileExists(Environ("USERPROFILE") &  "\Regulatory - Templates\Toolbar.dotm") Then
        Documents.Add sDoc
    Else
        MsgBox "The toolbar template is not found"
    End If
    Set FSO = Nothing
__________________
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