title: Send Outlook email with attachment using Excel VBA
body: <p>I am trying to send email with attachment using Excel VBA.</p>
  
  <p>My code is sending email if I am not including the attachment code line.</p>
  
  <p>When I write that line to send an attachment it is showing error.</p>
  
  <pre><code>Set MyApp = CreateObject("Outlook.Application")
  Set MyItem = MyApp.CreateItem(0)
  With MyItem
      .To = "saurabh.ad.sharma@accenture.com"
      .Subject = "Subject"
      .ReadReceiptRequested = False
      .HTMLBody = "resport"
      .Attachment = "C:\Users\saurabh.ad.sharma\Desktop\rrr.xlsx"
  End With
  MyItem.Send
  </code></pre>