基于PPT转PDF的VBS应该如何?
On Error Resume Next
Set ppt = CreateObject("PowerPoint.application")
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
Set fds = fso.GetFolder("E:\1-1\") '此处可以写自已文件所在的文件夹
Set ffs = fds.Files
For Each ff In ffs
If (LCase(Right(ff.Name,4))=".ppt" Or LCase(Right(ff.Name,4))="pptx" ) And Left(ff.Name,1)<>"~" Then
Set pptfile = ppt.Presentations.Open(ff.Path,false,false,false)
pptfile.Saveas Left(ff.Path,InStrRev(ff.Path,"."))&"pdf",32,false
If Err.Number Then
MsgBox Err.Description
End If
End If
Next
pptfiles.Close
ppt.Quit
Set pptfile = Nothing
Set ppt = Nothing作者: xjshuaishuai 时间: 2021-12-22 14:04
谢谢分享!作者: 永恒008 时间: 2022-2-18 14:07
牛人真多!!作者: 永恒008 时间: 2022-2-24 19:46