Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Copy and Paste into Outlook e-mail

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 ")
Msg.Send
End Sub


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

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default Excel Copy and Paste into Outlook e-mail

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

"Compuser" wrote in message
om...
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 ")
Msg.Send
End Sub


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

Thanks in advance!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Excel Copy and Paste into Outlook e-mail

See
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Compuser" wrote in message om...
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 ")
Msg.Send
End Sub


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

Thanks in advance!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy paste emails addresses from excel to outlook? wannabe68 Excel Discussion (Misc queries) 1 June 5th 08 05:23 PM
copy & paste, a NEW CONCEPT (from Outlook to... Excel) Brainless_in_Boston Excel Discussion (Misc queries) 1 February 24th 06 05:39 PM
copy & paste spreadsheet cells from excel to outlook to excel mismarple Excel Discussion (Misc queries) 1 September 20th 05 11:16 PM
Excel Copy/Paste into Outlook Compuser Excel Discussion (Misc queries) 1 December 5th 04 01:21 AM
Copy and Paste from Excel into Outlook Email message TroyB[_2_] Excel Programming 0 November 10th 04 08:01 AM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"