From: Opinicus on
Is there a simple, free tool that will convert lots of Word files (in
..rtf format) to .docx? I've found some web-based ones but:

I don't like the idea of submitting files to websites, whether I trust
the websites or not.

There are potentially several thousand of files to be converted, so a
batch processing method is essential.

Any ideas or recommendations?

--
Bob
http://www.kanyak.com
From: Doug Robbins - Word MVP on
A macro containing the following code will convert all of the files in the
folder C:\Test

Modify the line of code that contains that folder name to suit where you
have the documents located.

Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document
PathToUse = "C:\Test\"
Documents.Close SaveChanges:=wdPromptToSaveChanges
myFile = Dir$(PathToUse & "*.rtf")
While myFile <> ""
'Open document
Set myDoc = Documents.Open(PathToUse & myFile)
myDoc.SaveAs PathToUse & Left(myDoc.Name, InStr(myDoc.Name, ".")) &
"docx", wdFormatDocumentDefault
myDoc.Close
'Next file in folder
myFile = Dir$()
Wend


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Opinicus" <gezgin(a)spamcop.net.which.is.not.invalid> wrote in message
news:2eooq59vhmtfiv6kgij5mplv0hvda574n3(a)4ax.com...
> Is there a simple, free tool that will convert lots of Word files (in
> .rtf format) to .docx? I've found some web-based ones but:
>
> I don't like the idea of submitting files to websites, whether I trust
> the websites or not.
>
> There are potentially several thousand of files to be converted, so a
> batch processing method is essential.
>
> Any ideas or recommendations?
>
> --
> Bob
> http://www.kanyak.com

From: Opinicus on
On Fri, 26 Mar 2010 18:31:07 +1000, "Doug Robbins - Word MVP"
<dkr(a)REMOVECAPSmvps.org> wrote:

> A macro containing the following code will convert all of the files in the
> folder C:\Test

Wow! Thanks Doug. Once I got rid of the carriage return after the & it
worked like a charm.

--
Bob
http://www.kanyak.com

> Modify the line of code that contains that folder name to suit where you
> have the documents located.
>
> Dim myFile As String
> Dim PathToUse As String
> Dim myDoc As Document
> PathToUse = "C:\Test\"
> Documents.Close SaveChanges:=wdPromptToSaveChanges
> myFile = Dir$(PathToUse & "*.rtf")
> While myFile <> ""
> 'Open document
> Set myDoc = Documents.Open(PathToUse & myFile)
> myDoc.SaveAs PathToUse & Left(myDoc.Name, InStr(myDoc.Name, ".")) &
> "docx", wdFormatDocumentDefault
> myDoc.Close
> 'Next file in folder
> myFile = Dir$()
> Wend