Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1807
  • Last Modified:

Why is open Acrobat document from VBA not visible?

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
Chuck Wood
Asked:
Chuck Wood
  • 4
  • 3
1 Solution
 
Karl Heinz KremerCommented:
You are opening a PDDoc - these are opened "behind the scenes". You need to use an AVDoc to display the document.
0
 
Karl Heinz KremerCommented:
Do you have access to the IACOverview and IACReference documents from Adobe?
0
 
Chuck WoodAuthor Commented:
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Karl Heinz KremerCommented:
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
 
Chuck WoodAuthor Commented:
I will try that out and see what I can glean from it. Thanks.
0
 
Karl Heinz KremerCommented:
Which version of Acrobat do you have?
0
 
Chuck WoodAuthor Commented:
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

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now