How to send worksheet in email body?
<p>Is there any way I can attach as well as send a worksheet as an email body.</p>
<p>The below VBA code sends the worksheet as an attachment.</p>
<p>How can I send a worksheet in the body of email?</p>
<pre class="lang-vb prettyprint-override"><code>Sub Email()
    Dim OutApp As Object
    Dim OutMail As Object
    Dim wbTemp As Workbook
    Dim strFilename As String
    Dim Sendrng As Range
    
    ThisWorkbook.Worksheets(&quot;Test Worksheet&quot;).Copy
    
    
    Set wbTemp = ActiveWorkbook
    
    
    wbTemp.SaveAs ThisWorkbook.Path &amp; &quot;/&quot; &amp; &quot;TestWb&quot;, XlFileFormat.xlOpenXMLWorkbook
    
    strFilename = wbTemp.FullName
    
    
    Set OutApp = CreateObject(&quot;Outlook.Application&quot;)
    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail
        .To = &quot;test@testdomain.com&quot;
        .CC = &quot;&quot;
        .BCC = &quot;&quot;
        .Subject = &quot;Test Email&quot;
        .Body = &quot;&quot;
        .Attachments.Add strFilename
        .display
    End With
    
    End With
    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    
    wbTemp.Close
    
    Kill strFilename
    
End Sub
</code></pre>