Jmmac04
Board Regular
- Joined
- Nov 16, 2004
- Messages
- 185
I have a user who is tring to create a code in Word to open an HTML file and save it as a .doc file. Here is her code:
At this point it will not save as a .doc file but still as an HTML file. any ideas?? thanks~
Code:
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