Need a macro to Copy a selection and paste into a new email.

K

Koolmist

Hey all,
I am extremely new to Excel and have been "tinkering" with it for around
2 weeks now, and have come to the conclussion that i need to start learning
macros. I have recently been given a task of making a worksheet that gathers
data from multiple sheets and places that info into a single sheet once an
hour. Although the process I used was more than likely the least efficient it
still works fine. The data is recorded for each hour and via formulas
populates a "Reports" sheet. I need to learn how to make a macro that will
copy a selection on the "Reports" sheet, paste it into a new e-mail and sent
it from clicking on a single button. I figured out how to make a button from
reading the posts in this forum, but am at a loss as to how to make a macro
that will change sheets, select a range of cells,copy it, then open Outlook,
make a new email, paste it, send it, and then return to the original sheet,
but to cells below the ones previously filled in. Any and all assistance
would be greatly appreciated, as I am eager to see this sheet finally
finished.
 
K

Koolmist

I checked out his site but since I have no idea how to read this code what so
ever its greek to me. I did how ever figure out some of the code and have
gotten the Button to copy the appropiate cells, open a new email and fill the
subject line. I have run into a problem though. I don't know how to get it to
paste. I know I must change the .Display to .Send when I get it to work, but
how do i get it to paste in the body of the email??

Sub Email6()
'
' Email6 Macro
' Macro recorded 2/19/2006 by clawson
'

'
Sheets("Report").Select
Range("A49:K96").Select
Selection.Copy

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "[email protected]"
.CC = "Sick; GTW Managment"
.BCC = ""
.Subject = "6AM Heads-up Report"
.HTMLBody = RangetoHTML
.Display
End With

Sheets("Data Sheet").Select
Set OutMail = Nothing
Set OutApp = Nothing

End Sub

Again thanks for all of the help it's so close to being finished!!
 
Top