[英]Creating and closing pdf generates error when trying to exit Acrobat object
I am trying to create an instance of a pdf document and then close it.我正在尝试创建一个 pdf 文档的实例,然后将其关闭。
I added references in Tools->References.我在工具-> 参考中添加了参考。
I am getting error at the last two lines as highlighted.我在突出显示的最后两行出现错误。
Dim AcroApp As New Acrobat.AcroApp
Dim PartDocs() As Acrobat.CAcroPDDoc
.
.
.
If Not PartDocs(0) Is Nothing Then PartDocs(0).Close
Set PartDocs(0) = Nothing
'Quit Acrobat application
**AcroApp.Close
Set AcroApp = Nothing**
As I still cannot comment - have you tried this approach?由于我仍然无法发表评论-您是否尝试过这种方法?
AcroApp.Exit
Set AcroApp = Nothing
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.