Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Events

Status
Not open for further replies.

Bakunin

Programmer
Dec 21, 2000
31
GB
Hi,
can someone let me know why, when I open my word application from
a JavaScript that the AutoExec ( or any events ) are not fired?

However when I open the application manually ( by double clicking )
the events are fired without a problem.

I have my events in the normal.dot template.


My Source is

<HTML>
<HEAD>
<SCRIPT LANGUAGE=VBScript>
Dim objWord
Sub Btn1_onclick()
call OpenDoc()
End Sub

Sub OpenDoc()

Set objWord = CreateObject(&quot;Word.Application&quot;)
objWord.Visible = true
objWord.Documents.Add
End Sub

</SCRIPT>
<TITLE>Launch Word</Title>
</HEAD>
<BODY>
<INPUT TYPE=BUTTON NAME=Btn1 VALUE=&quot;Open Word Doc&quot;>
</BODY>
</HTML>

In normal.dot

Sub AutoExec()
Set MyApp.App = Word.Application
MsgBox &quot;AutoExec&quot;
End Sub

thansk in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top