?
Solved

Why is open Acrobat document from VBA not visible?

Posted on 2006-06-15
7
Medium Priority
?
1,745 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

 
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The ability to edit PDF documents can be useful, however it may not be a straight forward process. Many non-technical people don't realise that a PDF document is basically an image rather than a text file, even if it contains nothing but text. If…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

765 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