«

»

Jan
08
2012

Adding Outlook Recipients through VBA

VBA code to add e-mail recipients The following code will add e-mail recipients (To/Receivers list) through outlook VBA code

 
 
 
 
 

Sub Add_Receipients()
 
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
  
Set myOlApp = CreateObject(“Outlook.Application”)
Set myItem = myOlApp.CreateItem(olMailItem)
  
‘adding recipients
R1 = myItem.Recipients.Add(“email_ID1@somedomain.com”)
R2 = myItem.Recipients.Add(“email_ID1@somedomain.com”)
  

‘display the e-mail message with added recipients
myItem.Display
 
End Sub

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current month ye@r day *