title: How to save emails as html including colorshememapping.xml, filelist.xml, and themedata.thmx files?
body: <p>I need to &quot;SaveAs&quot; a list of emails to html including colorshememapping.xml, filelist.xml, and themedata.thmx files?</p>
  <p>If I &quot;SaveAs&quot; html manually one by one from Outlook to a specified shared folder, there are separate folders with 3 files (colorshememapping.xml, filelist.xml, and themedata.thmx) created on top of the &quot;Email subject.htm&quot;.</p>
  <p>The above manual step is different from below macro in Excel VBA that just changes the .msg to .htm.</p>
  <p>How can I SaveAs a list of emails to htm format like I have done manually in Outlook.</p>
  <p>There is another limitation. I cannot use <code>Application.ActiveInspector</code> due to security set by my company.</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Chgext()
  ThisWorkbook.Activate
  Sheets(&quot;RM response&quot;).Select
  strSourceDirectory = Range(&quot;B1&quot;).Value
      
  strSourceFile = Dir(strSourceDirectory &amp; &quot;*.msg&quot;)
  
  Do While strSourceFile &lt;&gt; &quot;&quot;
      Name strSourceDirectory &amp; strSourceFile As strSourceDirectory &amp; 
      Replace$(strSourceFile, &quot;.msg&quot;, &quot;.htm&quot;)
      c = c + 1
      strSourceFile = Dir()
  Loop
  
  End Sub
  </code></pre>