Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Email selected cells in body VBA

  1. #1
    New Member
    Join Date
    Oct 2008
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Email selected cells in body VBA

    I am trying to insert a range of cell in the body of an outlook email with the same format. The code I am using now is below and it does insert anything in the email body.

    Code:
    Sub Mail()
    Dim OutApp As Object
        Dim OutMail As Object
        Set OutApp = CreateObject("Outlook.Application")
        OutApp.Session.Logon
        Set OutMail = OutApp.CreateItem(0)
        On Error Resume Next
        With OutMail
            .To = "cbelcher@jpfryelaw.com"
            .CC = ""
            .BCC = ""
            .Subject = "Burden Report"
            .Body = ActiveSheet.Range("A1:D12")
            .Attachments.Add ("C:\Documents and   Settings\cbelcher\Desktop\Burden Report.xls")
    End With
        On Error GoTo 0
        Set OutMail = Nothing
        Set OutApp = Nothing
        Set objMsg = Nothing
    End Sub

  2. #2
    MrExcel MVP VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,651
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)

    Default Re: Email selected cells in body VBA


Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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