How do I convert all my Office 2003 documents to 2007 in one go?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have just installed MS Office Professional 2007 and was wondering if
there's a way of converting all of my old file formats into the new ones?

Thank you
 
Why would you want to? Word 2007 will happily open 2003 format files, which
remains the standard that most other people (certainly most businesses) are
using. Save them as 2007 format if and when you next use them. However if
you insist, the following macro will do the job -
http://www.gmayor.com/installing_macro.htm - for documents in the selected
folder, provided that Word 2007 is setup to save as DOCX by default.

Sub SaveAllAsDOCX()
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim oDoc As Document

With Dialogs(wdDialogCopyFile)
If .Display <> 0 Then
strPath = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With

If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
If Left(strPath, 1) = Chr(34) Then
strPath = Mid(strPath, 2, Len(strPath) - 2)
End If
strFileName = Dir$(strPath & "*.doc")

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)

strDocName = ActiveDocument.FullName
intPos = InStrRev(strDocName, ".")
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".docx"
oDoc.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatDocumentDefault
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
End Sub
 

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

Back
Top