J
Justin Williams via OfficeKB.com
Hi,
I am trying to get the VBScript behind the Outlook forms (Outlook's
VBScript runtime) to work with my COM-AddIn so that I can develop
functionality with the COM-AddIn (in C#) and some of the other IT staff can
then script that functionality.
I have had good success so far and am able to call from the VBScript any of
the methods or properties from my COM-AddIn like so:
Set test = Application.COMAddIns.Item("Custom.COMAddIn").Object
MsgBox "This is a test: " & test.testMethod("1 2 3")
Where I'm stuck is communicating back to the VBScript from the COM object
to raise my events. In Windows Scripting Host, you'd create a VBScript
procedure that hooked into the events by naming the procedures the same
name as the event (Test_onClick, Test_onWhatever, etc). Given the lack of
documentation I've seen on the subject, I am wondering if Outlook's
VBScript can perform a similar way to handle events, or not?
If I can't handle events the "right" way, is there a workaround where I
could, say, raise the event for a hidden control on the Outlook form
(Changed or Click or something) so the VBScript doesn't have to continually
poll my COM-AddIn?
Any ideas or suggestions would be GREATLY appreciated!
Thanks!
-
Justin
I am trying to get the VBScript behind the Outlook forms (Outlook's
VBScript runtime) to work with my COM-AddIn so that I can develop
functionality with the COM-AddIn (in C#) and some of the other IT staff can
then script that functionality.
I have had good success so far and am able to call from the VBScript any of
the methods or properties from my COM-AddIn like so:
Set test = Application.COMAddIns.Item("Custom.COMAddIn").Object
MsgBox "This is a test: " & test.testMethod("1 2 3")
Where I'm stuck is communicating back to the VBScript from the COM object
to raise my events. In Windows Scripting Host, you'd create a VBScript
procedure that hooked into the events by naming the procedures the same
name as the event (Test_onClick, Test_onWhatever, etc). Given the lack of
documentation I've seen on the subject, I am wondering if Outlook's
VBScript can perform a similar way to handle events, or not?
If I can't handle events the "right" way, is there a workaround where I
could, say, raise the event for a hidden control on the Outlook form
(Changed or Click or something) so the VBScript doesn't have to continually
poll my COM-AddIn?
Any ideas or suggestions would be GREATLY appreciated!
Thanks!
-
Justin