title: How to keep original word document open when saving copy in HTML?
body: <p>The problem I'm having is when I run my macro to save the current Word Document as a HTML type, the document still remains open but not in the original .docx format, it's in the .htm format. </p>
  
  <p>If I were to edit the document after the macro is ran, it wouldn't remain on the original .docx format later. </p>
  
  <p>I would appreciate feedback on how to remain in the original format when also saving a copy with a different format. Thanks. </p>
  
  <p>Here is my docx to html code in VBA</p>
  
  <pre><code>Sub DocToHTML()
  
      Dim slice As String
      Dim strDocName As String
      Dim PathOrg As String
  
      On Error Resume Next
  
      strDocName = ActiveDocument.Name
      slice = Left(strDocName, InStrRev(strDocName, ".") - 1)
      strDocName = ActiveDocument.Path + "\" + slice
      ActiveDocument.SaveAs2 FileName:=strDocName, FileFormat:=wdFormatHTML
  
  End Sub
  </code></pre>