Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CC the Sender in VBA Code
I am trying to have my macro CC the sender of the excel file as an
attachment. Here is my code: Sub Mail_workbook_Outlook_1() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = " .CC = From.Name .BCC = "" .Subject = ActiveWorkbook.Name .Body = "" .Attachments.Add ActiveWorkbook.FullName .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub Again, I want to CC the sender so they have confirmation they sent the email. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
CC the Sender in VBA Code
This is not easy
See this site to find the mail address http://vbnet.mvps.org/ Search for RegQueryValueEx: Retrieve Email Account Info (Outlook) -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Eric" wrote in message ... I am trying to have my macro CC the sender of the excel file as an attachment. Here is my code: Sub Mail_workbook_Outlook_1() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = " .CC = From.Name .BCC = "" .Subject = ActiveWorkbook.Name .Body = "" .Attachments.Add ActiveWorkbook.FullName .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub Again, I want to CC the sender so they have confirmation they sent the email. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to cc the sender using vba and outlook | Excel Discussion (Misc queries) | |||
Survey - Return to sender | Excel Discussion (Misc queries) | |||
Outlook/Excel return code to know if Sender pressed the SEND butto | Excel Programming | |||
Retrieve Sender in Calculate Event | Excel Programming | |||
Sender? | Excel Programming |