打开受密码保护的演示文稿
Open password protected presentation
如何使用 C# 或 VBA 打开受密码保护的 PowerPoint 演示文稿,在 excel workbook.open
中,该方法有一个密码参数。但是在PowerPoint中,它没有。
在 PowerPoint 中 Presentation.Open
方法没有密码参数
在Excel中,我可以使用
Application.Workbooks.Open(Filename,Password)
但是 PowerPoint 中没有对应的东西
我需要在 PowerPoint 文档打开时输入密码
这会起作用:在VBA[=13=中测试]
Dim PVW As ProtectedViewWindow, Pres As Presentation
Set PVW = ProtectedViewWindows.Open("Full Path ", "Password")
Set Pres = PVW.Edit("modify")
另一种方法:未测试
Sub SetPassword()
With Presentations.Open(FileName:="C:\My Documents\Earnings.ppt")
.Password = complexstrPWD 'global variable
.Save
.Close
End With
End Sub
取自:Link
如何使用 C# 或 VBA 打开受密码保护的 PowerPoint 演示文稿,在 excel workbook.open
中,该方法有一个密码参数。但是在PowerPoint中,它没有。
在 PowerPoint 中 Presentation.Open
方法没有密码参数
在Excel中,我可以使用
Application.Workbooks.Open(Filename,Password)
但是 PowerPoint 中没有对应的东西
我需要在 PowerPoint 文档打开时输入密码
这会起作用:在VBA[=13=中测试]
Dim PVW As ProtectedViewWindow, Pres As Presentation
Set PVW = ProtectedViewWindows.Open("Full Path ", "Password")
Set Pres = PVW.Edit("modify")
另一种方法:未测试
Sub SetPassword()
With Presentations.Open(FileName:="C:\My Documents\Earnings.ppt")
.Password = complexstrPWD 'global variable
.Save
.Close
End With
End Sub
取自:Link