ON ERROR RESUME NEXT set args=wscript.arguments arg=args(0) set w=createobject("word.application") set fso=createobject("scripting.filesystemobject") set docfile=fso.getfile(arg) docpath=docfile.path pt=left(docpath,Instrrev(docpath,"/")) txtpn=pt&left(docfile.name,instrrev(docfile.name,"."))&"txt" w.documents.open docpath,,,,,,,,,,,false w.documents(docpath).activate w.activedocument.saveas txtpn,2 w.activedocument.close w.quit set w=nothing