Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Posted

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.

  • 1 year later...
Posted

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...