title: Excel VBA: Sent Outlook email does not include pasted Range
body: <p>I have <a href="https://stackoverflow.com/a/20955476/2707864">initially answered</a> question <a href="https://stackoverflow.com/questions/20861607/how-to-only-paste-visible-cells-in-an-email-body">How to only paste visible cells in an email body</a></p>
  
  <p>The code I tested and posted (see below) did not include sending email. After the OP added that to his question, I added the <code>.Send</code> part, but the behavior I obtained is very strange.
  If I place a breakpoint just before sending, and I execute the <code>Sub</code>, an email is created with the correct info (including the pasted Excel <code>Range</code>). Then I continue execution and the email is correctly sent. But if I run the whole <code>Sub</code> at once, with no breakpoints, the email is sent with no pasted Excel <code>Range</code> in the body.</p>
  
  <p>What is the reason for that, and what is the solution?</p>
  
  <p>I have tried commenting/uncommenting the two last lines (<code>Set ... = Nothing</code>), but it does not help.</p>
  
  <hr>
  
  <p>Related questions:</p>
  
  <p><a href="https://stackoverflow.com/questions/3757381/copy-range-of-cells-from-excel-to-body-of-email-in-outlook">Copy range of cells from Excel to body of email in Outlook</a></p>
  
  <p><a href="https://stackoverflow.com/questions/2512351/pasting-formatted-excel-range-into-outlook-message">Pasting formatted Excel range into Outlook message</a></p>
  
  <hr>
  
  <p>Code of reference (based on the quintessential code by Ron de Bruin, see <a href="http://www.rondebruin.nl/win/s1/outlook/bmail3.htm" rel="nofollow noreferrer">this</a> and <a href="http://www.rondebruin.nl/win/s1/outlook/bmail2.htm" rel="nofollow noreferrer">this</a>):</p>
  
  <pre><code>Sub SendEmail()
  
      Dim OutlookApp As Object
      'Dim OutlookApp As Outlook.Application
      Dim MItem As Object
      'Dim MItem As Outlook.MailItem
  
      'Create Outlook object
      Set OutlookApp = CreateObject("Outlook.Application")
      'Set OutlookApp = New Outlook.Application
  
      Dim Sendrng As Range
      Set Sendrng = Worksheets("Test").Range("A1").SpecialCells(xlCellTypeVisible)
      Sendrng.Copy
  
      'Create Mail Item
      Set MItem = OutlookApp.CreateItem(0)
      'Set MItem = OutlookApp.CreateItem(olMailItem)
      With MItem
          .To = "test@email.com"
          .To = "SSEREBRINSKY@TENARIS.COM"
          .Subject = "Test"
          .CC = ""
          .BCC = ""
          '.Body = "a"
          .Display
      End With
      SendKeys "^({v})", True
      With MItem
          .Send
      End With
  
      'Set OutlookApp = Nothing
      'Set MItem = Nothing
  
  End Sub
  </code></pre>