【发布时间】:2017-02-16 21:18:57
【问题描述】:
我需要在 VBA 中打开受密码保护的 word 文档 它要求输入密码,如何通过代码打开 代码:
Dim DPDoc
Dim DPApp
Dim DPPath
DPPath = "C:\MyFolder\PwdProtectdFile.docx"
Set DPApp = CreateObject("word.Application")
' It is asking for the password here
DPDoc = DPApp.Documents.Open(DPPath)
【问题讨论】: