'docx转pdf、doc、rtf、txt
Option Explicit
Sub docx2other()
On Error Resume Next
Dim sEveryFile As String,sSourcePath As String,sNewSavePath As String
Dim CurDoc As Object
sSourcePath = "E:\DOCX文件\"
'假定待转换的docx文件全部在"E:\DOCX文件\"下,你需要按实际情况修改。
sEveryFile = Dir(sSourcePath &"*.docx")
Do While sEveryFile <> ""
Set CurDoc = Documents.Open(sSourcePath & sEveryFile, , , , , , , , , , , msoFalse)
sNewSavePath = VBA.Strings.Replace(sSourcePath & sEveryFile, ".docx", ".pdf")
'如果想导出doc/rtf/txt等,就把上一行行
1