G
Guest
Hello,
does anyone know, how i can create an event handler for an COM- object
created with CreateObject ?
For instance, i have the following :
Dim oWordApp As Variant
....
Set oWordApp = CreateObject ("Word.Application")
Now i have to do something within the word's "NewDocument" - event.
If i used an ActiveX control, i would get it with :
Sub oWordApp_NewDocument ()
EndSub
But how to create / assign the eventhandler for my dynamic variant oWordApp
- object ?
Background :
In my Application i use an ActiveX Control for handling a scanner. But only
a few workstation have a scanner. But nevertheless if have to setup the
ActiveX on each computer.
Now i want to use some kind of 'late binding' to avoid compiler failures
while opening the form with the ActiveX - control. I hope, this explains my
problem.
Thanks all
Tino
does anyone know, how i can create an event handler for an COM- object
created with CreateObject ?
For instance, i have the following :
Dim oWordApp As Variant
....
Set oWordApp = CreateObject ("Word.Application")
Now i have to do something within the word's "NewDocument" - event.
If i used an ActiveX control, i would get it with :
Sub oWordApp_NewDocument ()
EndSub
But how to create / assign the eventhandler for my dynamic variant oWordApp
- object ?
Background :
In my Application i use an ActiveX Control for handling a scanner. But only
a few workstation have a scanner. But nevertheless if have to setup the
ActiveX on each computer.
Now i want to use some kind of 'late binding' to avoid compiler failures
while opening the form with the ActiveX - control. I hope, this explains my
problem.
Thanks all
Tino