Looking for simple (batch) .doc to .docx converter (willing to pay). Thread poster: Michael Beijer
| Michael Beijer United Kingdom Local time: 14:49 Member (2009) Dutch to English + ... | Shai Navé Israel Local time: 16:49 English to Hebrew + ...
You just have to group all the files that you need to convert in one folder, open the first, and run this macro. Maybe it doesn't have all the bells and whistles that other converters might have, but for a simple batch conversion process this is an effective and efficient solution.
[Edited at 2013-11-14 12:51 GMT] | | | Michael Beijer United Kingdom Local time: 14:49 Member (2009) Dutch to English + ... TOPIC STARTER Thanks Shai! | Nov 14, 2013 |
Wow, that was easy. Saved myself some money and I now have a nice little icon (a smiley face) above my ribbon that runs your macro. Michael Here's the macro: Sub SaveAllDOCX() Dim strFilename As String Dim strDocName As String Dim strPath As String Dim oDoc As Document Dim fDialog As FileDialog Dim intPos As Integer 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 & "*.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
[Edited at 2013-11-14 13:14 GMT] | | | Michael Beijer United Kingdom Local time: 14:49 Member (2009) Dutch to English + ... TOPIC STARTER syntax error | Dec 17, 2013 |
Hi Shai, For some reason the macro doesn't work on my Win7 installation of Word 2013. It worked fine on my Windows 8 PC. I'm getting a syntax error at this line: Sub SaveAllDOCX() Dim strFilename As String Dim strDocName As String Dim strPath As String Dim oDoc As Document Dim fDialog As FileDialog Dim intPos As Integer Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) With fDialog ... See more Hi Shai, For some reason the macro doesn't work on my Win7 installation of Word 2013. It worked fine on my Windows 8 PC. I'm getting a syntax error at this line: Sub SaveAllDOCX() Dim strFilename As String Dim strDocName As String Dim strPath As String Dim oDoc As Document Dim fDialog As FileDialog Dim intPos As Integer 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 & "*.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 Any idea why? Michael ▲ Collapse | |
|
|
Shai Navé Israel Local time: 16:49 English to Hebrew + ... If you copied the code from your earlier post here then there are parts missing | Dec 17, 2013 |
Use the code here instead and see if it works. | | | Michael Beijer United Kingdom Local time: 14:49 Member (2009) Dutch to English + ... TOPIC STARTER Thanks Shai, | Dec 17, 2013 |
This one works! Michael | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Looking for simple (batch) .doc to .docx converter (willing to pay). Wordfast Pro | Translation Memory Software for Any Platform
Exclusive discount for ProZ.com users!
Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value
Buy now! » |
| Trados Studio 2022 Freelance | The leading translation software used by over 270,000 translators.
Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop
and cloud solution, empowering you to work in the most efficient and cost-effective way.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |