Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Batch conversion DOC to HTML: free software?

 
   Home -> Office -> Conversions RSS
Next:  Conversions: rtf broken (no images) with office 2003 service pack 2  
Author Message
Fred from NYC

External


Since: Feb 04, 2006
Posts: 5



(Msg. 1) Posted: Thu Feb 01, 2007 2:53 pm
Post subject: Batch conversion DOC to HTML: free software?
Archived from groups: microsoft>public>word>conversions (more info?)

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.
Back to top
Login to vote
Graham Mayor

External


Since: Jul 04, 2006
Posts: 4294



(Msg. 2) Posted: Fri Feb 02, 2007 6:42 am
Post subject: Re: Batch conversion DOC to HTML: free software? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Login to vote
Fred from NYC

External


Since: Feb 04, 2006
Posts: 5



(Msg. 3) Posted: Fri Feb 02, 2007 11:25 am
Post subject: Re: Batch conversion DOC to HTML: free software? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Graham, thank you, this is exactly what I was looking for. The macro
works great and the layout changes are not a problem.

Graham Mayor wrote:
> You mean something different from the batch converter supplied with Word?
>
> How about
>
> Sub SaveAllAsHTM()
> [snip]
> End Sub
>
> http://www.gmayor.com/installing_macro.htm
>
> I assume you are aware that the layout of the files will be different?
Back to top
Login to vote
Graham Mayor

External


Since: Jul 04, 2006
Posts: 4294



(Msg. 4) Posted: Sat Feb 03, 2007 9:22 am
Post subject: Re: Batch conversion DOC to HTML: free software? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I would have thought the batch conversion wizard supplied woiuld have done
the job - the macro was a mere modification from one designed to do
something else, but if it works for you ...... Smile

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Fred from NYC wrote:
> Graham, thank you, this is exactly what I was looking for. The macro
> works great and the layout changes are not a problem.
>
> Graham Mayor wrote:
>> You mean something different from the batch converter supplied with
>> Word? How about
>>
>> Sub SaveAllAsHTM()
>> [snip]
>> End Sub
>>
>> http://www.gmayor.com/installing_macro.htm
>>
>> I assume you are aware that the layout of the files will be
>> different?
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Conversions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]