Batch Conversion Wizard

G

Graham Mayor

There are no wizards in Word 2007. What is it that you are trying to do?
There is no need to batch convert doc to docx format. Word 2007 will handle
both and there are advantages to leaving doc as doc.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

The following macro will batch save all docs from a selected folder to html.
It will crash if any of the documents are protected. The original documents
are unchanged.
http://www.gmayor.com/installing_macro.htm

Sub SaveAllAsHTM()
Dim strFileName As String
Dim strDocName() As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , "Save all as HTML"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
End With
If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFileName = Dir$(strPath & "*.doc")
While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
strDocName = Split(ActiveDocument.FullName, ".")
If ActiveDocument.SaveFormat = 0 Or _
ActiveDocument.SaveFormat = 12 Then
ActiveDocument.SaveAs _
FileName:=strDocName(0) & ".htm", _
FileFormat:=wdFormatFilteredHTML
End If
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
End Sub

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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