Rammesses Posted May 28, 2003 Posted May 28, 2003 Has anyone else had problems with, and successfully managed, to put a user control on an Outlook inspector page? I'm trying to do this using a VB.Net COM AddIn and it's making me pull what little hair I've got left out! I've managed to create the page using dim objMyPage = myInspector.ModifiedFormPages.Add("My Custom Page") and add a boring label using dim objMyLabel = objMyPage.Controls.Add("Forms.Label.1", "lblFirstLabel", true) but when I try and add my user control using dim objMyUserControl = objMyPage.Controls.Add("MyProject.MyUserControl", "ucFirstUserControl", true) I get an "invalid argument" exception. I KNOW that the ProgID of my user control is correct - I checked the registry - I just can't get the user control to stick to the page. And I REALLY want to use the user -control - having to manually instantiate all the controls that make it up and wire them all up by hand in the AddIn code would be a nightmare. Suggestions? Quote
*Gurus* divil Posted May 28, 2003 *Gurus* Posted May 28, 2003 Isn't Outlook expecting an ActiveX control? Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Rammesses Posted May 30, 2003 Author Posted May 30, 2003 You'd think so, but... You'd think so, but... I'd already sucessfully used a user-control on a custom property page in the main Outlook options dialog. So I assumed that VS.Net was neatly packaging my user control with a COM/ActiveX wrapper that Outlook XP understood. Hence my confusion - adding a user control to the custom options page worked just fine. Addint a user control to a custom page on an inspector does not. Quote
omegasri Posted July 8, 2004 Posted July 8, 2004 Addin VB.Net Usercontrol in MS Outlook Hi Rammesses, Im also having the same problem (adding usercontrol through inspector) which you have posted Ref: ********* objMyPage.Controls.Add(onLogicAddin.UserControl1, "UserControl1", True) ******** Have you found any solution for this,(or is there any alternate way to achieve this) if u had pls help post it. -Sridhar.r Quote
omegasri Posted July 12, 2004 Posted July 12, 2004 Hi Visit http://www.error-bank.com/microsoft.public.dotnet.general/07dc01c3ce20$8dcdb590$a301280a@phx.gbl_Thread.aspx this link provides the solution Quote
Recommended Posts