title: How to forward an existing outlook mail with new values from excel using vba
body: <p>I've an existing promotional mail with HTML formatting, colors, bullets etc. I would like to forward this mail to new set of recipients using VBA.</p>
  
  <p>I've an existing mail with following Body:</p>
  
  <hr>
  
  <p>Hi XXnameXX,</p>
  
  <p>Some Picture are present &amp; Lot of colored formatting.</p>
  
  <p>Thanks for registering to our website. Your user id is XXuseridXX.</p>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p>Here XXnameXX should be replaced with FirstName and XXuseridXX with userID</p>
  
  <p>I am able to forward the selected mail from Outlook. But it's not forwarding it with all the images/formatting/bullets. On receiving end its showing a complete different mail with link and all.</p>
  
  <pre><code>Sub ForwardEmail()
   Dim oApp As Outlook.Application
   Dim objFolder As Outlook.MAPIFolder
   Set oApp = New Outlook.Application
   Set objNS = Application.GetNamespace("MAPI")
   Set objFolder = objNS.GetDefaultFolder(olFolderInbox)
   Dim oEmail As Outlook.MailItem
  
   For Each objitem In Application.ActiveExplorer.Selection
       If objFolder.DefaultItemType = olMailItem Then
           If objitem.Class = olMail Then
  
               Set myforward = objitem.Forward
  
               Set objRecip = myforward.Recipients.Add("firstlastname@gmail.com")
  
               myforward.HTMLBody = Replace(myforward.HTMLBody, "xxnamexx", "FirstName", 1, 1)
  
               myforward.Send
  
           End If
       End If
   Next
  End Sub
  </code></pre>