I have this script in my HTML page:
<script language="VBScript">
Sub LoadTemplate(strPath)
Dim objWord
On Error Resume Next
Set objWord = GetObject(, "Word.Application"
If Err.number <> 0 Then
Set objWord = CreateObject("Word.Application"
End If
Err.Clear
On Error Goto 0
objWord.Visible = True
objWord.Documents.Add strPath
End Sub
</script>
and then a link:
<a href="#" onClick="LoadTemplate ('test.dot')">TEST</a>
But Internet Explorer gives me this error:
Error: Object required: ‘objWord’
Code: 0
Anyone??
<script language="VBScript">
Sub LoadTemplate(strPath)
Dim objWord
On Error Resume Next
Set objWord = GetObject(, "Word.Application"
If Err.number <> 0 Then
Set objWord = CreateObject("Word.Application"
End If
Err.Clear
On Error Goto 0
objWord.Visible = True
objWord.Documents.Add strPath
End Sub
</script>
and then a link:
<a href="#" onClick="LoadTemplate ('test.dot')">TEST</a>
But Internet Explorer gives me this error:
Error: Object required: ‘objWord’
Code: 0
Anyone??