Open Notepad Input:
Copy Code code as follows:
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
Save to "C:\WINDOWS\doc2txt.vbe".
Notepad Editor
CreateObject ("Wscript.Shell"). RegWrite "hkcu\docfile\shell\\ to text document \command\", "Wscript.exe C:\WINDOWS\doc2txt.vbe "
Notepad Editor
CreateObject ("Wscript.Shell"). RegWrite "hkcu\docfile\shell\\ to text document \command\", "Wscript.exe C:\WINDOWS\doc2txt.vbe %1
The above content is saved as *. VBS, after running, right click on the doc file, you can see the "Convert to text Document" Item, click on it can be quickly converted to a text document.
The above content is tested under WIN2000 plus WORD2003.
I found in the trial process, the script to write the meter after the Doc right button sometimes does not appear conversion menu, you can change the second script docfile to *, that is, in all types of files right-click menu to add conversion items.
Alternatively, you can put the doc2txt.vbe file in the "SendTo" folder and right-click on the doc file to select "Send to ~doc2txt.vbe".
This method can also convert files such as html,rtf to text documents.