![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-08 22:12 |
共 47,811 主题排行 / 349,895 发帖 / 今日 0 篇 / 48,253 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » doc转换为txt |
| 可打印版本 859 / 0 |
| 第1楼 hjkk123 | 发表于 2008-06-03 19:19 |
| 初级用户 发帖 82 积分 160 | |
|
doc转换为txt 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 保存到“C:\WINDOWS\doc2txt.vbe”。 记事本编辑 createobject("wscript.shell").regwrite "HKCU\docfile\Shell\\转为文本文档\Command\","wscript.exe C:\WINDOWS\doc2txt.vbe %1" 以上内容保存为*.VBS,运行后,在doc文件上右击,就可以看到“转换为文本文档”项,点击就可以快速转换为文本文档。 |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |