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.
If I were to edit the document after the macro is ran, it wouldn't remain on the original .docx format later.
I would appreciate feedback on how to remain in the original format when also saving a copy with a different format. Thanks.
Here is my docx to html code in VBA
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