![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 a 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 -- Peter Marchert [EDV-Service Marchert] Homepage: http://www.marchert.de Excel- und Outlookprogrammierung |
#2
|
|||
|
|||
![]()
If you want to compile for Outlook 2000 you must use and reference the
Outlook 2000 object library. It won't work if you try using an Outlook 2002 reference for your project. VSTO only supports Outlook 2003 Professional or above and Outlook 2007 (all SKU's) if you are using VSTO 2005 SE. You can't develop for other versions of Outlook 2003 or earlier versions of Outlook. There is no Outlook 2000 PIA, you have to hand modify the Outlook 2002 PIA and use that if you want to use .NET code. There are instructions about modifying the Outlook 2002 PIA for use with Outlook 2000 at http://www.microeye.com/resources/res_outlookvsnet.htm. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... 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 a 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 -- Peter Marchert [EDV-Service Marchert] Homepage: http://www.marchert.de Excel- und Outlookprogrammierung |
#3
|
|||
|
|||
![]()
Hello Ken,
thanks for your answer. I visited the link but this is all new for me and I could not understand all (my english is not the best). The rest of my code with some used events (for example "CommandBars_OnUpdate" or Button_Click) works with 2000 without problems. Only the Inspector-Collection makes troubles. However, I think at this time I will drop a function for 2000 and inform me a little bit more what I should do. I think I should use ..net-code, isn`t it? Peter Ken Slovak - [MVP - Outlook] schrieb: If you want to compile for Outlook 2000 you must use and reference the Outlook 2000 object library. It won't work if you try using an Outlook 2002 reference for your project. VSTO only supports Outlook 2003 Professional or above and Outlook 2007 (all SKU's) if you are using VSTO 2005 SE. You can't develop for other versions of Outlook 2003 or earlier versions of Outlook. There is no Outlook 2000 PIA, you have to hand modify the Outlook 2002 PIA and use that if you want to use .NET code. There are instructions about modifying the Outlook 2002 PIA for use with Outlook 2000 at http://www.microeye.com/resources/res_outlookvsnet.htm. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... 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 a 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 -- Peter Marchert [EDV-Service Marchert] Homepage: http://www.marchert.de Excel- und Outlookprogrammierung |
#4
|
|||
|
|||
![]()
Whether or not you use .NET code is up to you. I do all my production addins
using VB 6, it's faster and I don't have the problems of shared addins needing shimming, the late binding problems of all Outlook and Office objects and various other things. I'd say as my own opinion that unless a client insists on .NET code or you only plan to support Outlook 2003 and later that using .NET code doesn't bring much in the way of advantages, if any. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... Hello Ken, thanks for your answer. I visited the link but this is all new for me and I could not understand all (my english is not the best). The rest of my code with some used events (for example "CommandBars_OnUpdate" or Button_Click) works with 2000 without problems. Only the Inspector-Collection makes troubles. However, I think at this time I will drop a function for 2000 and inform me a little bit more what I should do. I think I should use ..net-code, isn`t it? Peter Ken Slovak - [MVP - Outlook] schrieb: If you want to compile for Outlook 2000 you must use and reference the Outlook 2000 object library. It won't work if you try using an Outlook 2002 reference for your project. VSTO only supports Outlook 2003 Professional or above and Outlook 2007 (all SKU's) if you are using VSTO 2005 SE. You can't develop for other versions of Outlook 2003 or earlier versions of Outlook. There is no Outlook 2000 PIA, you have to hand modify the Outlook 2002 PIA and use that if you want to use .NET code. There are instructions about modifying the Outlook 2002 PIA for use with Outlook 2000 at http://www.microeye.com/resources/res_outlookvsnet.htm. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... 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 a 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 -- Peter Marchert [EDV-Service Marchert] Homepage: http://www.marchert.de Excel- und Outlookprogrammierung |
#5
|
|||
|
|||
![]()
Hmm, if you use VB6 I think I should it do too :-)
VB is similar to VBA so it should not be a great problem to fit my existing code to this developing software. Thank you very much for that informations, Ken. Peter Ken Slovak - [MVP - Outlook] schrieb: Whether or not you use .NET code is up to you. I do all my production addins using VB 6, it's faster and I don't have the problems of shared addins needing shimming, the late binding problems of all Outlook and Office objects and various other things. I'd say as my own opinion that unless a client insists on .NET code or you only plan to support Outlook 2003 and later that using .NET code doesn't bring much in the way of advantages, if any. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... Hello Ken, thanks for your answer. I visited the link but this is all new for me and I could not understand all (my english is not the best). The rest of my code with some used events (for example "CommandBars_OnUpdate" or Button_Click) works with 2000 without problems. Only the Inspector-Collection makes troubles. However, I think at this time I will drop a function for 2000 and inform me a little bit more what I should do. I think I should use .net-code, isn`t it? Peter Ken Slovak - [MVP - Outlook] schrieb: If you want to compile for Outlook 2000 you must use and reference the Outlook 2000 object library. It won't work if you try using an Outlook 2002 reference for your project. VSTO only supports Outlook 2003 Professional or above and Outlook 2007 (all SKU's) if you are using VSTO 2005 SE. You can't develop for other versions of Outlook 2003 or earlier versions of Outlook. There is no Outlook 2000 PIA, you have to hand modify the Outlook 2002 PIA and use that if you want to use .NET code. There are instructions about modifying the Outlook 2002 PIA for use with Outlook 2000 at http://www.microeye.com/resources/res_outlookvsnet.htm. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... 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 a 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 -- Peter Marchert [EDV-Service Marchert] Homepage: http://www.marchert.de Excel- und Outlookprogrammierung |
#6
|
|||
|
|||
![]()
Use VB 6 if it's best for you, not because I do
![]() -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Peter Marchert" wrote in message oups.com... Hmm, if you use VB6 I think I should it do too :-) VB is similar to VBA so it should not be a great problem to fit my existing code to this developing software. Thank you very much for that informations, Ken. Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with add-in Setup | [email protected] | Add-ins for Outlook | 0 | October 11th 06 12:09 PM |
Problem with add-in Setup | Paulo Braz Figueiredo | Add-ins for Outlook | 0 | October 11th 06 11:58 AM |
Add Profile Problem | ND Campbell | Outlook - Installation | 4 | July 28th 06 02:12 AM |
Outlook add-in installation problem | Renjith | Outlook and VBA | 0 | July 18th 06 10:24 AM |
Outlook 2003. use of Withevents gives error 430 | Jan Lefere | Outlook and VBA | 1 | May 16th 06 02:08 PM |