|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Copy excel cells to outlook mail body
hi i am facing problem while copying cells from an excel worksheet to an outlook mail body. i have copied the used cells to the clipboard but am not able to paste the same into the mail.
can any one please help me on this? i m pasting the code below. Sub Mail_workbook_Outlook() Dim OutApp As Object Dim OutMail As Object Dim Data As DataObject Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) On Error Resume Next ' copy used cells ActiveWorkbook.Worksheets(5).UsedRange.Copy With OutMail .To = "me@me.com" .CC = "cclist" ' .FROM = "ECGatewayTeam@alcoa.com" .BCC = "" .Subject = "subject" 'i m not able to paste the cells from the clipboard. ' .Body = "GetFromClipboard" .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Copy excel cells to outlook mail body |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|