Has anyone else had problems with, and successfully managed, to put a user control on an Outlook inspector page? Im trying to do this using a VB.Net COM AddIn and its making me pull what little hair Ive got left out!
Ive 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 cant 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?
Ive 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 cant 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?