Solved

Why is open Acrobat document from VBA not visible?

Posted on 2006-06-15
7
1,641 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
Comment Utility
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
Comment Utility
Do you have access to the IACOverview and IACReference documents from Adobe?
0
 
LVL 16

Author Comment

by:Chuck Wood
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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
Comment Utility
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
Comment Utility
Which version of Acrobat do you have?
0
 
LVL 16

Author Comment

by:Chuck Wood
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now