J
Jodi
HI ALL~
I have an HTML document that opens in word. I am trying to create a macro
to save it as a .doc file. Here is the code I have so far. It saves it as
HTML still, but will not save it as a .doc file. Any ideas?
Sub SaveAsTextFile()
Dim strDocName As String
Dim intPos As Integer
Application.DefaultSaveFormat = wdFormatDocument
'Find position of extension in filename
strDocName = ActiveDocument.Name
intPos = InStrRev(strDocName, ".")
'Save file with new extension
ChangeFileOpenDirectory "C:\DaPassport-AP\ST\"
ActiveDocument.SaveAs FileName:=strDocName
ActiveDocument.SaveAs FileFormat:=wdFormatDocument
End Sub
I have an HTML document that opens in word. I am trying to create a macro
to save it as a .doc file. Here is the code I have so far. It saves it as
HTML still, but will not save it as a .doc file. Any ideas?
Sub SaveAsTextFile()
Dim strDocName As String
Dim intPos As Integer
Application.DefaultSaveFormat = wdFormatDocument
'Find position of extension in filename
strDocName = ActiveDocument.Name
intPos = InStrRev(strDocName, ".")
'Save file with new extension
ChangeFileOpenDirectory "C:\DaPassport-AP\ST\"
ActiveDocument.SaveAs FileName:=strDocName
ActiveDocument.SaveAs FileFormat:=wdFormatDocument
End Sub