Outlook 2003 custom form, ActiveX control not work
I am developing AddIn for Outlook 2003/2007. In Outlook 2003 I create custom form and add my custom ActiveX control to it. Then when I press "Run this Form" the form is processed and I can see my control. But when I call the form using program method there is an error: An unhandled exception occurred in your application. Contact your administrator or the author of this document for further assistance.
Details:
The operation failed.
************** Exception Text **************
System.Runtime.InteropServices.COMException (0xA5131418): The operation failed.
at Microsoft.Office.Interop.Outlook._MailItem.Display (Object Modal)
at OutlookAddIn5.ThisAddIn.ThisAddIn_Startup(Object sender, EventArgs e) in C:\Projects\My Tests
Project\OutlookAddIn5\ThisAddIn.cs:line 48
at Microsoft.Office.Tools.AddIn.OnStartup()
at OutlookAddIn5.ThisAddIn.FinishInitialization() in C:\Projects\My Tests
Project\OutlookAddIn5\ThisAddIn.Designer.cs:line 65
at Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.ExecutePhase(String methodName)
at Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.ExecuteCustomizationStart upCode()
at Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.ExecuteEntryPointsHelper( )
at
Microsoft.VisualStudio.Tools.Applications.Runtime. AppDomainManagerInternal.Microsoft.VisualStudio.To ols.Applications
.Runtime.IExecuteCustomization2.ExecuteEntryPoints ()
************** Loaded Assemblies **************
By adding other ActiveX controls, for example:Windows Media Player, everything works ok. In Outlook 2007 my custom ActiveX control works ok. Where is the problem in?
|