Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
e-mail a range of cells as the body
I want to be able to add a Range of cells to the body of my email, I'm using
the following method but I'm not getting it to work. Does anyone knows what I'm doing wrong? For x = 1 To 5 For y = 1 To 5 If Sheets("Values").Range("H" & x) = Date + y And IsEmpty(Sheets("Values").Range("N" & x)) Then email = Sheets("Values").Range("H" & x).Offset(0, 4).Select subj = "test" Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) Set Text = Range("H" & x - 1 & ":K" & x + 4).SpecialCells(xlCellTypeVisible) With OutMail .To = email .CC = "" .Subject = subj .body = Text .Send End With Set OutMail = Nothing Set OutApp = Nothing Sheets("Values").Range("M" & x) = "e-mail sent" End If Next y Next x -- Thank you... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mailing an excel range in the body of an e-mail | Excel Discussion (Misc queries) | |||
Convert to HTML and e-mail selection as the body of the e-mail. | Excel Programming | |||
Paste excel range into a mail item's body | Excel Programming | |||
Range of Cells to create body of email | Excel Worksheet Functions | |||
Paste range of cells on E-maul Msg Body | Excel Programming |