sqlrage
(SQLRage)
1
Description
In Windows explorer drag a doc file onto this script, and it will save a copy as a docx file.
Source Code
Set objArgs = WScript.Arguments
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
FullName = objArgs(I)
FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
Set objWord = CreateObject("Word.application")
set objWordBook = objWord.documents.Open(FullName)
objWord.application.visible=false
objWord.application.displayalerts=false
objWordBook.SaveAs FileName & "docx", 12
objWordbook.close
objWord.Quit
Set objWord = Nothing
set objWordBook = Nothing
Next
1 Spice up
bogdanmart
(bogdanmart)
2
If you move CreateObject(“Word.application”) out of thew loop, the script works in ~ten times faster, if there are more than few files. I had to convert 12 files. But really thank you, you helped me alot. But i had to convert docx to doc. P.S. Here is my modification. docx2doc.vbs · GitHub