You mean something different from the batch converter supplied with Word?
How about
Sub SaveAllAsHTM()
Dim FirstLoop As Boolean
Dim myFile As String
Dim strDocName As String
Dim PathToUse As String
Dim MyDoc As Document
Dim Response As Long
PathToUse = InputBox("Path To Use?", "Path", "D:\My
Documents\Test\Versions\")
On Error Resume Next
Documents.Close SaveChanges:=wdPromptToSaveChanges
FirstLoop = True
myFile = Dir$(PathToUse & "*.doc")
While myFile <> ""
Set MyDoc = Documents.Open(PathToUse & myFile)
If FirstLoop Then
'With ActiveDocument
'Selection.PageSetup.Orientation = wdOrientLandscape
'End With
FirstLoop = False
Response = MsgBox("Do you want to process " & _
"the rest of the files in this folder", vbYesNo)
If Response = vbNo Then Exit Sub
'Else
'With ActiveDocument
'Selection.PageSetup.Orientation = wdOrientLandscape
'End With
End If
strDocName = ActiveDocument.FullName
intPos = InStrRev(strDocName, ".")
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".htm"
MyDoc.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatHTML
MyDoc.Close SaveChanges:=wdDoNotSaveChanges
myFile = Dir$()
Wend
End Sub
http://www.gmayor.com/installing_macro.htm
I assume you are aware that the layout of the files will be different?
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Fred from NYC wrote:
> I am looking for a free program that can automatically convert a set
> of MS Word documents (with graphs and tables) to HTML format. Is
> there for example a macro that can cycle through all documents in a
> folder, open them in Word and save them as HTML files? Repeated
> Google searches only turned up various programs that are sold for
> that purpose. I use MS Word 2003 and Windows XP. Many thanks for your
> help.