How to delete emails from outlook through c#
The following example demonstrate how we can delete emails or messages from various mail folders of the Outlook through C#. In the following example we are deleting emails from Junk folder. Continue reading How to delete emails from outlook through c#
This article demonstrates how to create an contact in outlook programmatically using visual basic 6.0 through Microsoft Outlook’s object-model.
Continue reading Creating a new contact in outlook using vb 6
This article demonstrates how to create an appointment in outlook programmatically using visual basic 6.0 through Microsoft Outlook’s object-model.
This example requires a button control in Standard EXE project in visual basic 6.0, you need an early-bound reference to a Microsoft Outlook type library. Double-click the button, and then add the following code:
Dim oApp As Outlook.Application
Set oApp = CreateObject("Outlook.Application")
Dim oNs As Outlook.NameSpace
Set oNs = olApp.GetNamespace("MAPI")
Dim oAppt As Outlook.AppointmentItem
Set oAppt = oApp.CreateItem(olAppointmentItem)
oAppt.Start = "12/2/2011 2:20:00 PM"
.Duration = 60
.Subject = "meeting with Client"
.Body = "About Project..."
.Location = "Our New York Office"
.ReminderSet = True
Set oNs = Nothing
Set oAppt = Nothing
Set oApp = Nothing
This example shows how to create an e-mail message in Outlook.
Private Sub CreateMailItem()
Dim objItem As Outlook.MailItem = _
objItem.Subject = "Hello Author"
objItem.To = "email@example.com"
objItem.Body = "Hello Author, i want to contact you"
objItem.Importance = Outlook.OlImportance.olImportanceLow
The following code sample show how to remove or delete all contacts in outlook using c# programming language.
Before using this code sample you need to add reference of ‘Microsoft.Office.Interop.Outlook’ library.
Continue reading Code sample for deleting all contacts in outlook using C#
We can use this code sample for deleting all outlook contact using vb.net language, before using this code sample add reference ‘Microsoft.Office.Interop.Outlook’ library
Continue reading Code snippet for deleting all outlook contacts using VB.Net
This code sample can be used for deleting contact from outlook contacts. before using this code sample you need to add reference of ” library.
Continue reading Delete contact from outlook contact folder in .net
The following code example demonstrates how to create a new Outlook e-mail item with the specified information such as To, subject or body.
In this example we will create a new Outlook email item and display. The following code sample requires a reference of ‘Microsoft.Office.Interop.Outlook’ library in your project. Continue reading How to create Outlook email item using C# and vb.net
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)
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#