I want to embed a custom c# windows form (or WPF) user control into an outlook view.
I am using Outlook 2003 and Visual Studio 2008.
I did download an example for Outlook 2007 here:
and also here:
http://msdn.microsoft.com/en-us/library/aa479345.aspx
I tested it and under 2007 it is working, but for 2003 i am getting the following error when i want to open the view:
Could not complete the operation due to error 80131509
I can start it from Visual Studio, it is registering the folder just fine, debugging works and all that. It creates an HTML page that contains my type as an object parameter – but the Initialize method that should be called is either not present (not shown via JS) or it has some errors.
The breakpoints for RegisterSafeForScripting are also never hit – maybe related to that.
First thank you AMissico – and i will look into the description and links you provided as well. The follwinng code did for me the trick (but the button controls and others have broken layout – but WFP works so i will use wpf). I have to refactor the code but it was the working version for me…
The example i finally found that worked after tweaking it a bit for me:
http://www.microsoft.com/downloads/details.aspx?familyid=078124E9-1E88-4F51-8C98-3C1999CFE743&displaylang=en
The following file is more or less taken from the above example
together with this file:
This method sets up the web view: