找回密码
 加入
搜索
查看: 7157|回复: 9

[AU3基础] [已解决]有没有批量处理 把word 2007 或者 2010 转成 word 2003的脚本啊?

  [复制链接]
发表于 2013-2-8 15:58:15 | 显示全部楼层 |阅读模式
本帖最后由 zzwwdd 于 2013-2-24 16:48 编辑

有没有批量处理 把word 2007 或者 2010  转成 word 2003的脚本啊?
一个个转很麻烦的!!! docx   转成 doc 文件格式!!!
发表于 2013-2-8 17:07:01 | 显示全部楼层
这个试下
  1. $folder=FileSelectFolder("请选择文本所在目录","")
  2. If @error Then Exit 0
  3. If StringRight($folder,1)<>"" Then $folder&=""
  4. $file=FileFindFirstFile($folder&"\*.doc?")
  5. $wordapp=ObjCreate("word.application")
  6. $wordapp.visible=False
  7. While 1
  8.         $currentfile=FileFindNextFile($file)
  9.         If @error Then ExitLoop
  10.         $currentfile=$folder&$currentfile
  11.         If StringRegExp(StringLower($currentfile),"\.doc.$",0)=1 Then
  12.                 $wd=$wordapp.documents.open($currentfile)
  13.                 $wd.saveas2(StringLeft($currentfile,StringLen($currentfile)-1),0)
  14.                 $wd.close
  15.         EndIf
  16. WEnd
  17. FileClose($file)
  18. $wordapp.quit
  19. $wordapp=Null
  20. MsgBox(0,"提示","所选目录转换完成!",5)
复制代码
发表于 2013-2-9 10:27:41 | 显示全部楼层
试试楼上的,应该可以
 楼主| 发表于 2013-2-11 14:03:17 | 显示全部楼层
多谢,我先试下!!!
发表于 2013-2-12 09:24:50 | 显示全部楼层
 楼主| 发表于 2013-2-14 16:08:38 | 显示全部楼层
试过了!!不行啊!!
发表于 2013-2-14 19:59:06 | 显示全部楼层
你是不2003的office没装2007的补丁包
发表于 2013-2-15 20:21:43 | 显示全部楼层
把saveas2改为saveas
 楼主| 发表于 2013-2-24 16:46:51 | 显示全部楼层
可以了,谢谢2楼的 和8楼的兄弟!!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2026-9-22 08:50 , Processed in 0.109162 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表