Problems extending Outlook inspoectors woth VB.Net

Rammesses

New member
Joined
May 27, 2003
Messages
2
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?
 
Youd think so, but...

Youd think so, but...

Id 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.
 
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
 
Hi Visit
http://www.error-bank.com/microsoft.public.dotnet.general/07dc01c3ce20$8dcdb590$a301280a@phx.gbl_Thread.aspx

this link provides the solution
 
Back
Top