Question : Modify outgoing messages in Outlook with a VB add-in

Hello all,
Here is my situation. I have been tasked at my job to create an add-in for Microsoft Outlook 2007 that will display a dialogue box when a user sends out an e-mail that will ask them to choose a classification of that e-mail.
I would like that dialogue to be a windows form, which I know how to code with VB.net. I, however, do not know how to write add-ins to interface with Outlook to accomplish this. I have figured out how to load the templates that come with VS 2008 and there is one for Outlook 2007, but I can not figure out how to intercept e-mails or how to display windows forms.

Please any help would be very much appreciated.

Answer : Modify outgoing messages in Outlook with a VB add-in

My previous post is C#. Translation to vb.net follows:
Private Sub ThisApplication_ItemSend(ByVal item As System.Object, _  
    ByRef cancel As Boolean) _  
    Handles Application.ItemSend  
    cancel = False  
    Dim mailItem As Outlook._MailItem = TryCast(item, Outlook._MailItem)  
    If mailItem IsNot Nothing Then  
        'Call you winform here
    End If  
End Sub

Note: I do not have vb.net installed at home. The vb.net may contain compile errors.  
Random Solutions  
 
programming4us programming4us