Excel Copy and Paste into Outlook e-mail

C

Compuser

This is what I'd like to do with VBA: COPY a range of cells in Excel
and PASTE it into a new Outlook e-mail message. I know you can display
an Excel worksheet or range in Outlook, but for my purposes, I'd like
to COPY and PASTE.

I found this on the web. Can someone please help adding to this? The
mailitem
object doesn't seem to support .paste.

Sub Test
Dim objApp As Outlook.Application
Dim Msg As MailItem
Set objApp = CreateObject("Outlook.Application")
Set Msg = objApp.CreateItem(olMailItem)

Sheets("Sheet1").Select
Selection.Copy

<<<<<What Do I put in here???>>>>>

Msg.Recipients.Add ("(e-mail address removed)")
Msg.Send
End Sub


I have both 2002 and 2003 versions of Excel & Outlook.

Thanks in advance!
 
S

Sharad Naik

It is not possible to copy / paste an entire sheet there.

The MailItem refers to complete mail item and not to the Body of the mail
item.

You can use Msg.Body = " ......................."
But it has to be a string . you can not set Msg.Body to a Worksheet.

Sharad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top