I have a workflow process with which working with a Word Template, I need to accomplish the following:
Save the Active Document to a predefined location depended upon the users selection in the form.
Close the document.
Open a new instance based upon the template.
The users are opening the template in the standard way (click on a shortcut, recieve a Document1 [2,3,4,etc]).
Currently I have the first two requirements completed. The Document instance of the template is saved to the location and closed. But when it gets to the point of creating the new instance, nothing happens. I understand why it is happening (When the ActiveDocument.Close method fires, it closes the document instance and it's attatched TemplateProject instance leaving just a Normal Template instance running). I have tried to open a new document instance using a method placed in Normal (really not the preferred way I would like to take this), but this too has proven a little more difficult to accomplish.
Any assistance would be greatly appreciated.
Dim strTempData As String
strPath = "P:\"
strAppPath = TemplateProject.ThisDocument.Path & "\Surgery Form.dot"
strDocTitle = ActiveDocument.FormFields("Text1").Result & " " _
& Replace(ActiveDocument.FormFields("Text17").Result, "/", "-")
Select Case ActiveDocument.FormFields("AttendDoctor").Result
Case "Dr. Lawrence Mandel"
strPath = strPath & "Surgery Scheduling\"
Case "Dr. William Cruce"
strPath = strPath & "Surgery Scheduling-Dr. Cruce\"
MsgBox ("A doctor was not selected. Please select a doctor and try again.")
strSaveString = strPath & strDocTitle & ".doc"
MsgBox ("File has been saved to: " & strSaveString & _
" Please continue.")
Documents.Add Template:=strAppPath, NewTemplate:=False