S
Stephen English
Hi
I have 30 templates which, when they open (call the instance docA), load a
master template which stores user forms and code applicable to all 30
templates. I am not and do not wish to put this master template in any Word
startup folder because it is with the 30 master templates in a folder to make
it transportable to offline computers.
After I load the master template, I load the user form which is stored on
the master template. When I click OK on the user form and update bookmarks,
it trying to find the bookmarks on the Master template whereas I want it to
locate and update them on docA.
Please can anyone tell me how to keep track of this document without saving
it somewhere and reopening it. docActive in code below is not working.
Thanks
Stephen
Public Sub AutoNew()
Dim strPath As String
Dim obj As Object
Dim docActive As Document
strPath = ActiveDocument.AttachedTemplate.Path & "\"
' Open master template
Set obj = Documents.Open(strPath & "ProjectManagement.dot")
Set docActive = ActiveDocument
Application.Run "FillProjectCombo"
Application.Run "FillNameCombo"
Application.Run "ShowForm1", docActive
End Sub
I have 30 templates which, when they open (call the instance docA), load a
master template which stores user forms and code applicable to all 30
templates. I am not and do not wish to put this master template in any Word
startup folder because it is with the 30 master templates in a folder to make
it transportable to offline computers.
After I load the master template, I load the user form which is stored on
the master template. When I click OK on the user form and update bookmarks,
it trying to find the bookmarks on the Master template whereas I want it to
locate and update them on docA.
Please can anyone tell me how to keep track of this document without saving
it somewhere and reopening it. docActive in code below is not working.
Thanks
Stephen
Public Sub AutoNew()
Dim strPath As String
Dim obj As Object
Dim docActive As Document
strPath = ActiveDocument.AttachedTemplate.Path & "\"
' Open master template
Set obj = Documents.Open(strPath & "ProjectManagement.dot")
Set docActive = ActiveDocument
Application.Run "FillProjectCombo"
Application.Run "FillNameCombo"
Application.Run "ShowForm1", docActive
End Sub