Solved

Why is open Acrobat document from VBA not visible?

Posted on 2006-06-15
7
1,684 Views
Last Modified: 2012-06-22
I open an Acrobat PDF document from VBA and it is open but not visible.
How can I make it visible?

Code:

    Dim doc As New AcroPDDoc
    If doc.Open("C:\Temp.pdf") Then
        MsgBox "Opened C:\Temp.pdf"
    Else
        MsgBox "Could not open C:\Temp.pdf"
    End If

I receive the Opened C:\Temp.pdf message box but can't see the document.
0
Comment
Question by:Chuck Wood
  • 4
  • 3
7 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 16914794
You are opening a PDDoc - these are opened "behind the scenes". You need to use an AVDoc to display the document.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 16914813
Do you have access to the IACOverview and IACReference documents from Adobe?
0
 
LVL 16

Author Comment

by:Chuck Wood
ID: 16915220
1. I changed the code to:

    Dim doc As New AcroAVDoc
    If doc.Open("C:\Temp.pdf","TempTitle") Then
        MsgBox "Opened C:\Temp.pdf"
    Else
        MsgBox "Could not open C:\Temp.pdf"
    End If

I got the error: There was an error opening this document. This file cannot be found.

2. No, I do not have access to the documents. Where can I find them?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 16915271
The Overview document is only available for SDK subscribers or ASN members, but you can download the reference document from here: http://partners.adobe.com/public/developer/acrobat/sdk/index_doc.html#iac

I am no VB programmer, but your code does not look right. See if the reference document does help. Which version of Acrobat are you using?
0
 
LVL 16

Author Comment

by:Chuck Wood
ID: 16916063
I will try that out and see what I can glean from it. Thanks.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 16916441
Which version of Acrobat do you have?
0
 
LVL 16

Author Comment

by:Chuck Wood
ID: 16916447
I changed the code using some of the information in the reference document:

   ' requires a reference to Adobe Acrobat 7.0 Type Library
    Dim ac As New Acrobat.AcroApp
    ac.Show
    ac.Maximize 1
    Dim doc As New AcroAVDoc
    doc.Open("C:\Temp.pdf","TempTitle")

It works fine. Thanks very much.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
In this second video of the Xpdf series, we discuss and demonstrate the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). Download and inst…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question