Tag Archives: Outlook in VB.Net

code samples, examples,free projects related to outlook programming in vb.net.

How to read To,Cc,Bcc fields from current mailitem in vsto 2010

 
If you want to get all members of to,cc, bcc fields from the current outlook compose mail item,then we can use Application.ActiveInspector().CurrentItem object in vsto add-ins.

you can try following code snippt for reading all Recipients information with address, name and we can also get  to,cc, bcc fields from the current compose mail item.

Private Sub GetInfo()
    Dim strTo As String = ""
    Dim strCC As String = ""
    Dim strBCC As String = ""
 
    Dim _item As Outlook.MailItem = Globals.ThisAddIn.Application.ActiveInspector().CurrentItem
    strTo = _item.To
    strCC = _item.CC
    strBCC = _item.BCC
    For Each Rec As Outlook.Recipient In _item.Recipients
        MessageBox.Show("Recipient name : " & Rec.Name)
     Next
 End Sub

How to open Outlook contact window in vb.net and C#

How to open Outlook contact window in .net

If you want to add new contact information in outlook form vb.net application through outlook contact window, then you can use this code sample.
you need to add a reference to the Microsoft Outlook Object Library.

Continue reading How to open Outlook contact window in vb.net and C#