VSTO 2008 how to bind Form Region controls to Item data fields

  • Thread starter Thread starter escamoteur
  • Start date Start date
E

escamoteur

Hi,

perhaps it's so obvious that I don't see it, but I searching the web now for about an hour and don't find an answer.

I'm using Outlook 2007.

So far I used VS2005 and designed my Form Regions with the Outlook Form Designer.

Now I wanted to try the new VS2008 and I'm excited how easy the generation of an Add-In is BUT:

I can add a new Form Region, fine, but how do I add Controls that are bound to the Item Data Fields like a text control that is
bound the the "Subject" field of its Outlook Item??

Also how can I add "Outlook Specific controls" to a Form created with the VS2008 designer? Like the Body Control, or the Outlook
Categorie control?

Please give a pointer!

Tom
 
See if that helps... this is in your formRegion.vb

Private Sub frDigIt_FormRegionShowing(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.FormRegionShowing


Dim mailItem As Outlook.MailItem
If TypeOf (Me.OutlookItem) Is Outlook.MailItem Then
If Me.OutlookFormRegion.FormRegionMode = _
Outlook.OlFormRegionMode.olFormRegionRead Then
mailItem = CType(Me.OutlookItem, _
Outlook.MailItem)
Label1.Text = "This form region contains information " & _
"about " & mailItem.Subject

End If
End If

End Sub



escamoteur wrote on Wed, 05 May 2010 16:0
 
Hi Tom,
I believe you can't use the VS designer to get Outlook specific controls.
If you want those you still need to design the form in Outlook and import it
via the New Form Region command.

Regards,
Casper
 
Back
Top