![]() |
|
#2
|
||||
|
||||
|
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 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
how to determine the full path of the template from which a document was created?
|
XmisterIS | Word VBA | 4 | 08-28-2024 03:32 PM |
Insert variable in path name
|
bearcublandon | Word VBA | 6 | 01-03-2019 08:17 PM |
| Windows 10 (Microsoft) has named my User Profile folder. | wondermuse | Windows | 0 | 01-04-2017 10:00 PM |
User input to a variable on the document
|
dsm1995gst | Word VBA | 1 | 09-03-2013 03:43 PM |
| attaching (relative,logical or virtual) path to template word document | wissam | Mail Merge | 0 | 08-04-2009 05:09 AM |