磨刀不误砍柴工
2023-10-29 早上上班 磨了磨刀:
word批量转pdf
法一:
1.在桌面随意新建一个doc文档,然后打开后同时按alt和F11,双击下图方框。

2.将代码复制

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54Sub BatchConvertToPDF()
Dim destFolderPath As String
destFolderPath = GetFolderPath
If destFolderPath <> Empty Then
Dim path As Variant
For Each path In GetFilePaths()
Dim indexOfSlash, indexOfDot As Integer
indexOfSlash = InStrRev(path, "\")
indexOfDot = InStrRev(path, ".")
Dim destFilePath As String
destFilePath = destFolderPath + Mid(path, indexOfSlash, indexOfDot - indexOfSlash) + ".pdf"
ConvertToPDF path, destFilePath
Next path
End If
End Sub
Function GetFilePaths()
Dim folderPath As String
With Application.FileDialog(msoFileDialogFilePicker)
.Filters.Add "word文件", "*.doc; *.docx; *.docm"
.Title = "请择要转换的word文件"
If .Show = -1 Then
Set GetFilePaths = .SelectedItems
End If
End With
End Function
Function GetFolderPath()
Dim folderPath As String
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Title = "请选择要存放的目录"
If .Show = -1 Then
GetFolderPath = .SelectedItems(1)
End If
End With
End Function
Sub ConvertToPDF(srcPath As Variant, destPath As String)
Documents.Open FileName:=srcPath, ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
destPath, ExportFormat:= _
wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForOnScreen, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
ActiveDocument.Close
End Sub
3.按F5运行代码,选择pdf要保存的位置,需要转换的word(word文件可多选),等待转换成功。
法二:
(有福昕的前提下)
非常简单 也很好用啊

福昕高级PDF编辑器 https://www.aliyundrive.com/s/Ye8gpyiSSiC 提取码: iz27 点击链接保存,或者复制本段内容,打开「阿里云盘」APP ,无需下载极速在线查看,视频原画倍速播放。
批量复制文件名称
非常简单:选中要复制的文件,按住Shift再右键,复制文件地址

可以先复制到记事本,然后 Ctrl+H 替换多余的部分为空

文件批量重命名
不必多说,上链接
ReNamer Pro 7.3.exe https://www.aliyundrive.com/s/17KLzJbQMAm 点击链接保存,或者复制本段内容,打开「阿里云盘」APP ,无需下载极速在线查看,视频原画倍速播放。
阿里云超过200文件数目则无法分享(我没开会员),因此大家拿到手后双击exe文件可以选择安装便携版
然后选中文即可

非常简单,非常方便








