Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
How can I convert a batch of .wpd files to Word 2007 files?
I know how to convert individual files to Word 2007 but I have too many to go
one by one. |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
How can I convert a batch of .wpd files to Word 2007 files?
You could use the following macro:
Sub SaveAllAsDOCX() Dim strFileName As String Dim strDocName As String Dim strPath As String Dim oDoc As Document 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", , "List Folder Contents" 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 If Left(strPath, 1) = Chr(34) Then strPath = Mid(strPath, 2, Len(strPath) - 2) End If strFileName = Dir$(strPath & "*.wpd") 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 http://www.gmayor.com/installing_macro.htm You will need to have the appropriate file converter installed, and with some of the older file converters you will get a security warning for each opened file. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org SPW wrote: I know how to convert individual files to Word 2007 but I have too many to go one by one. |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
How can I convert a batch of .wpd files to Word 2007 files?
Word 2000 has a BAtch conversion template
"Graham Mayor" wrote: You could use the following macro: Sub SaveAllAsDOCX() Dim strFileName As String Dim strDocName As String Dim strPath As String Dim oDoc As Document 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", , "List Folder Contents" 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 If Left(strPath, 1) = Chr(34) Then strPath = Mid(strPath, 2, Len(strPath) - 2) End If strFileName = Dir$(strPath & "*.wpd") 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 http://www.gmayor.com/installing_macro.htm You will need to have the appropriate file converter installed, and with some of the older file converters you will get a security warning for each opened file. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org SPW wrote: I know how to convert individual files to Word 2007 but I have too many to go one by one. |
#4
Posted to microsoft.public.word.newusers
|
|||
|
|||
How can I convert a batch of .wpd files to Word 2007 files?
But this is Word 2007?
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Pimamedic wrote: Word 2000 has a BAtch conversion template "Graham Mayor" wrote: You could use the following macro: Sub SaveAllAsDOCX() Dim strFileName As String Dim strDocName As String Dim strPath As String Dim oDoc As Document 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", , "List Folder Contents" 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 If Left(strPath, 1) = Chr(34) Then strPath = Mid(strPath, 2, Len(strPath) - 2) End If strFileName = Dir$(strPath & "*.wpd") 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 http://www.gmayor.com/installing_macro.htm You will need to have the appropriate file converter installed, and with some of the older file converters you will get a security warning for each opened file. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org SPW wrote: I know how to convert individual files to Word 2007 but I have too many to go one by one. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I batch convert files to word? | Microsoft Word Help | |||
Can I convert linked files to embedded files in MS Word | Microsoft Word Help | |||
how do I convert abode acrobat files to microsoft word files? | Microsoft Word Help | |||
how do you convert wordperfect files into microsoft word files | Microsoft Word Help | |||
How do I convert MS Word Office 2000 files to PDF files? | Microsoft Word Help |