P
Peter Marchert
Hello,
the following code works in the VBA-Editor of Outlook:
Option Explicit
Private WithEvents colInsp As Outlook.Inspectors
Private WithEvents objInsp As Outlook.Inspector
Private Sub Class_Initialize()
Set colInsp = Outlook.Application.Inspectors
End Sub
Private Sub colInsp_NewInspector(ByVal Inspector As Outlook.Inspector)
Set objInsp = Inspector
MsgBox objInsp, vbInformation
End Sub
If I create with this code an Com-Add-In it occurs on the line "Set
objInsp = Inspector" this error: "Run-time-error 459 - Object or class
does not support the set of events".
I`m developing the Add-Ins with the developer Office XP and Outlook
2003. The same code works on Outlook-Versions from 2002 or higher. The
error only occurs on Outlook 2000. So I think it has something to do
with "binding"? But I don`t know anything about this :-(
Since a few days I have access to the msdn-library where a "Visual
Studio 2005 Pro" and a "Visual Studio Tools for Office System" is
included. Now my questions are:
1. Can I develop with this software Com-Add-Ins for Outlook 2000-2007?
2. Have I to migrate the VBA-Code to C++ or can I still use my existing
code with some modifications?
Thanks for any help!
Gruß
Peter
the following code works in the VBA-Editor of Outlook:
Option Explicit
Private WithEvents colInsp As Outlook.Inspectors
Private WithEvents objInsp As Outlook.Inspector
Private Sub Class_Initialize()
Set colInsp = Outlook.Application.Inspectors
End Sub
Private Sub colInsp_NewInspector(ByVal Inspector As Outlook.Inspector)
Set objInsp = Inspector
MsgBox objInsp, vbInformation
End Sub
If I create with this code an Com-Add-In it occurs on the line "Set
objInsp = Inspector" this error: "Run-time-error 459 - Object or class
does not support the set of events".
I`m developing the Add-Ins with the developer Office XP and Outlook
2003. The same code works on Outlook-Versions from 2002 or higher. The
error only occurs on Outlook 2000. So I think it has something to do
with "binding"? But I don`t know anything about this :-(
Since a few days I have access to the msdn-library where a "Visual
Studio 2005 Pro" and a "Visual Studio Tools for Office System" is
included. Now my questions are:
1. Can I develop with this software Com-Add-Ins for Outlook 2000-2007?
2. Have I to migrate the VBA-Code to C++ or can I still use my existing
code with some modifications?
Thanks for any help!
Gruß
Peter