Results 1 to 2 of 2

Outlook Email with Body from Excel

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Outlook Email with Body from Excel

    The following code works great for me to send an email file from Excel to Outlook automatically. However, I want to add a body to the message and cannot figureout where and how to add it to this code. Let's say for example, that I want to say "See attached." How would I add this? I tried .body = "See attached." but this is not working.

    Sub Relay()
    'Working in 97-2010
        Dim wb As Workbook
        Dim I As Long
    
    
        Set wb = ActiveWorkbook
    
        If Val(Application.Version) >= 12 Then
            If wb.FileFormat = 51 And wb.HasVBProject = True Then
                MsgBox "There is VBA code in this xlsx file, there will" & vbNewLine & _
                       "be no VBA code in the file you send. Save the" & vbNewLine & _
                       "file first as xlsm and then try the macro again.", vbInformation
                Exit Sub
            End If
        End If
    
        On Error Resume Next
        For I = 1 To 3
            wb.SendMail "Jarret Test", _
                        "System Discharge Report"
        
            If Err.Number = 0 Then Exit For
        Next I
        On Error GoTo 0
    End Sub
    Last edited by dreicer_Jarr; 10-03-2013 at 03:35 PM. Reason: Solved on my own.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Export body of Outlook email to Excel
    By dougmorgan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 12:37 PM
  2. export outlook 2007 email into excel with subject and body of email
    By akulka58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 02:37 PM
  3. Replies: 2
    Last Post: 08-01-2012, 02:47 PM
  4. Outlook Email Body to Excel
    By Sciortmj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2012, 02:10 PM
  5. Controlling Outlook (body of email) via excel
    By hlatigo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2009, 04:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1