Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim oApp As Object
Dim doc As Object
Dim strDocName As String
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
'Set the path to the Oversight Template
strDocName = "L:\Test\Test.dot"
Set doc = oApp.Documents.Add(strDocName)
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
|