真技术之批量将doc转为docx的方法

2024-11-05 10:16:06

1、第一步:打开一个空白word,按住ALT+F11,弹出VB编程界面即宏。(wps和office打开宏的方法自行百度)

真技术之批量将doc转为docx的方法

2、第二步:在左边空白处右击,依次选择:插入—>模块

真技术之批量将doc转为docx的方法

3、第三步:在如图所示空白区插入vba代码

真技术之批量将doc转为docx的方法

4、==============屏顿幂垂================================【vba代码】 Sub doc旌忭檀挢x2doc() 'docx文件转doc文件Dim myDialog As FileDialog, oFile As VariantSet myDialog = Application.FileDialog(msoFileDialogFilePicker)With myDialog .Filters.Clear '清除所有文件筛选器中的项目 .Filters.Add "所有 WORD2007 文件", "*.docx", 1 '增加筛选器的项目为所有WORD2007文件 .AllowMultiSelect = True '允许多项选择 If .Show = -1 Then '确定 For Each oFile In .SelectedItems '在所有选取项目中循环 With Documents.Open(oFile) .SaveAs FileName:=Replace(oFile, "docx", "doc"), FileFormat:=0 .Close End With Next End IfEnd WithEnd Sub ========================================

真技术之批量将doc转为docx的方法

5、第四步:选择工具栏中: 运行->运行子过程/用户窗体

真技术之批量将doc转为docx的方法

6、第五步:执行后会弹出文件选择框,选择要转换的所有doc文件即可。(选择所有文件使用Ctrl或者shift选择多个文件)

真技术之批量将doc转为docx的方法
猜你喜欢