Macro to save as a .doc file

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
 
M

Marc Adams [marcmyword.com]

Try combining the statements...
activedocument.SaveAs FileName:="Marc", FileFormat:=wdFormatDocument

Hope it helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top