![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I just found the following code to automatically add the attachement and send
to a receipient. It works fine. But What I want is that one email address should be in the "To" field and 3 other email address to be in the "Bcc" field. Also in the body of the mail, I need to add two constant line(Text) and with my signature. Can someone enhance the below coding for this requirement. Sub Foobar() Dim oApp As Outlook.Application Dim oNS As Outlook.NameSpace Dim oMail As Outlook.MailItem Set oApp = CreateObject("Outlook.Application") Set oNS = oApp.GetNameSpace("MAPI") oNS.Logon Set oMail = oApp.CreateItem(olMailItem) With oMail .Subject = "Cims data" .Body = "Some body text" .Attachments.Add "c:\myFolder\File1.xls" .Attachments.Add "c:\myFolder\File2.xls" .Recipients.Add " .Recipients.ResolveAll .Send End With End Sub |
#2
|
|||
|
|||
![]()
Set recip = oMail.Recipients.Add "
recip.Type = olBcc Repeat as needed. See http://www.outlookcode.com/codedetail.aspx?id=615 for a code sample to insert the user's default signature. Also note that if you call oMail.Display, the default signature will be added automatically. You can then prefix the Body property value with the text you want to add. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "mrbalaje" wrote in message ... I just found the following code to automatically add the attachement and send to a receipient. It works fine. But What I want is that one email address should be in the "To" field and 3 other email address to be in the "Bcc" field. Also in the body of the mail, I need to add two constant line(Text) and with my signature. Can someone enhance the below coding for this requirement. Sub Foobar() Dim oApp As Outlook.Application Dim oNS As Outlook.NameSpace Dim oMail As Outlook.MailItem Set oApp = CreateObject("Outlook.Application") Set oNS = oApp.GetNameSpace("MAPI") oNS.Logon Set oMail = oApp.CreateItem(olMailItem) With oMail .Subject = "Cims data" .Body = "Some body text" .Attachments.Add "c:\myFolder\File1.xls" .Attachments.Add "c:\myFolder\File2.xls" .Recipients.Add " .Recipients.ResolveAll .Send End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
add 1+XXX area code to phone nr in my area code | OH | Outlook - Using Contacts | 3 | August 3rd 06 03:45 PM |
Enhance Outlook Express with Outlook 2003 capabilities-Calendar | jro4200 | Outlook - Calandaring | 1 | June 10th 06 05:35 PM |
outlook 2007 enhance email tracking | kevin forsythe | Outlook - General Queries | 1 | June 5th 06 01:34 AM |
enhance Outlook Calendar so it wil allow copying and pasting apts | Bill | Outlook - Calandaring | 2 | March 30th 06 10:05 AM |
code : Code : 800cccd2 | scotty971fr | Outlook Express | 1 | January 19th 06 11:59 PM |