Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range for Body of E-Mail
I am trying to use a range of cells in Excel as the body for an e-mail in
Outlook. The name for the range is 'DuesReceipt'. It doesn't seem to like setting olBody to the range. Can someone help? Public olToName As String Public olccName As String Public olbccName As String Public olSubject As String Public olBody As String Public olRange As Object Public olAttach1 As String Sub SendReceipt() Dim olApp As Outlook.Application Dim olMail As MailItem Dim SigString As String Dim Signature As String Dim xx As Integer Dim yy As Integer Dim zz As Integer Set olApp = New Outlook.Application SigString = "C:\Documents and Settings\...\Signatures\BillLong.txt" If Dir(SigString) = "" Then Signature = GetBoiler(SigString) Else Signature = "" End If olToName = Range("K5").Value olSubject = "Dues Receipt" Set olRange = Range("DuesReceipt") Set olMail = olApp.CreateItem(olMailItem) With olMail .To = olToName .Subject = olSubject .Body = olRange .Send End With Set olMail = Nothing Set olApp = Nothing End Sub -- Bill @ UAMS |
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) | |||
e-mail a range of cells as the body | Excel Programming | |||
Convert to HTML and e-mail selection as the body of the e-mail. | Excel Programming | |||
Mail as body | Excel Discussion (Misc queries) | |||
Paste excel range into a mail item's body | Excel Programming |