|
-
Dec 10th, 2009, 04:56 PM
#1
Thread Starter
New Member
[RESOLVED] How to capture a Acrobat PDF window closing event in VB6?
Hi,
I am trying to develop a normal window form that user can click on the PDF filename and Acrobat opens up the PDF file, then when the user clicks "X" on the PDF window, I want to capture that event before the window actually closes and pops the user if he wants to save the file to the local drive.
Here is the code that I use to open up the PDF file, which works perfect:
Dim appAcrobat As AcroApp
Dim docAcrobat As AcroAVDoc
Set appAcrobat = CreateObject("AcroExch.App")
appAcrobat.Show
Set docAcrobat = CreateObject("AcroExch.AVDoc")
docAcrobat.Open sFullFileName, sFileName
But I don't know how to capture any of the events related to the PDF window via appAcrobat or docAcrobat object, since I can not even use "WithEvents" keyword when I delcare them, that way the compiler throws an error saying: "object does not source automation events."
By the way, I am referencing Adobe Acrobat 7.0 Type Library.
So I come here for some ideas. Any advice will be appreaciated.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|