Creating and pasting using VB

M

mewilh0

I need to create an email and paste some data already selected in excel
into the body. I have just started to attempt this so if I need to add
mapi or anything like that please let me know. Any help would be very
helpful....

Thanks,

Matt
 
O

Otto Moehrbach

If you copy straight from an Excel sheet to an email, you will be pasting an
object and that can be a nuisance, particularly if you need to edit the
contents before sending it. I simply paste it to Word first, then copy it
from Word into the email. This may not suit your needs though. HTH Otto
 
M

Matt

Thanks for the quick response but I should not have to edit the object
once it is in the email. Any ideas on how to create an email and paste
an object from excel into the body?
 
O

Otto Moehrbach

I have done it many times with just copy/paste. But I was copying cells
only. Otto
 
M

Matt

i just have a selection of cells (i.e. a1:f28) but i can't find the
code to create an email and paste the selected data into the body....
if you could help that would be great
 
O

Otto Moehrbach

Matt
I must be misunderstanding you and what you want to do. I just created
a new email to myself, I opened an Excel file. I copied a group of cells.
I went to the email message and pasted into the body of the message. I then
sent the message.
I received the message and there was the group of cells. HTH Otto
 
A

aidan.heritage

The missing part of this question is what email program? Assuming
outlook, then it will be possible to do it - in essence, you would
create a new mail item, then set the body to be the range you want.
 
M

Matt

I apologize. Yes, I am using outlook but everytime I try to create a
new email using vb i get errors. Do I need to include references to
another library or something?
 
A

aidan.heritage

Just in case the email doesn't arrive, this is to alert you to the fact
that I've replied via email (!)
 
Top