PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com
_____________________________________________________________
I am not sure why it no longer works, but I can offer you two solutions.
1. Instead of an empty string give it a title (i.e. Set objCIPAVDoc =
objCIPPDDoc.OpenAVDoc("junk")). This works.
2. Get the AvDoc by doing gobjAcrobat.GetActiveDoc. This does pretty
much the same thing.
Yehuda
-----Original Message-----
From: Dick Vohlers [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PDFdev] Acrobat 6 and OpenAVDoc
PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com
_____________________________________________________________
I have a Windows 2K Acrobat 5.0 batch process that I run. Most of the
work is done in a VB program via IAC calls, but there are some things
not exposed via IAC (such as getting the names and destinations of all
bookmarks) that I need. For those other pieces, the VB program calls a
VC++ plug-in using the MenuItemExecute call. I'm now working on updating
this code to Acrobat 6, and I've run into an issue.
Here are the relevant sets and calls put together into a little test
program:
Dim objCIPPDDoc As Object
Dim objCIPAVDoc As Object
Dim bCalledOK As Boolean
Set gobjAcrobat = CreateObject("AcroExch.App")
Set objCIPPDDoc = CreateObject("AcroExch.PDDoc")
If objCIPPDDoc.Open("C:\Test.pdf") Then
Set objCIPAVDoc = objCIPPDDoc.OpenAVDoc("") '<-- THIS ONE
DOESN'T WORK
bCalledOK = gobjAcrobat.MenuItemExecute("SASI:MyMenuItem")
If Not objCIPAVDoc Is Nothing Then
objCIPAVDoc.Close (True)
Set objCIPAVDoc = Nothing
End If
End If
This sample program works using Acrobat 5 just fine. However, using
Acrobat 6, the line with OpenAVDoc doesn't work--objCIPAVDoc is still
Nothing afterwards. Because of that, the program can't find the menu
item to execute and nothing happens.
Does anyone know if this is a bug, or a design change for Acrobat 6.0?
Any ideas how to get it to work?
Thanks,
Dick
P.S. I get the digest version of this list, so it may be a day or two
before I see any followup posts.
*******************************
Richard J. (Dick) Vohlers
SAS Institute, Cary, NC
[EMAIL PROTECTED]
(919) 531-1127
*******************************
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfdev.html
To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfdev.html