Acrobat 9 PDDoc Object Not Created for Some Users (VB6 App)

Posted on 2009-05-01
Last Modified: 2013-11-25
We have an old VB6 app that uses the Acrobat Type Library to access and manipulate the PDDoc object in pdf files. It has run for years using Acrobat 6. We upgraded to Acrobat 9, and the code worked fine on my PC, and when I installed it on users' workstations.

It also presents a view of the pdf using the AcroPDF dll (was pdf.ocx under Acrobat 6), which works fine.

I installed both the Acrobat 9 and our app on our Terminal Server (through Add/Remove Programs). I logged in as administrator, with Domain Admin rights.

For users accessing it through theTerminal Server, it does not work uless they are signed with the same login. It doesn't even work for me when I log in with my own name, and my login also has Domain Admin rights. (There is one other user it does work for, and he and I have the same rights!)

We then uninstalled Acrobat 9, went back to 6, went back to the original app, and now it is doing the same thing under Acrobat 6, which it had never done before. So something was different after the Acrobat 9 install, and is still giving us problems we never had.

They get an error: "object variable or with block variable not set".

The app creates an instance of a dll we wrote (in VB6) and :calls a method:
Set AcroInvoice = New SRSClaimsUI_Equity.AcrobatInvoice
TDBNDeletePageFrom.MaxValue = AcroInvoice.GetPageCount(m_strLoadFileName)

The AcroInvoice.GetPageCount method creates the PDDoc object and then just looks for the page count:
Set pdTarget = CreateObject("AcroExch.PDDoc")
GetPageCount = pdTarget.GetNumPages

It is either blowing up at the call to the dll method, or when the dll tries to call GetNumPages.

I assume that it either can't get to the dll (it's in the same folder and is registered by the set program, or can't get to Acrobat. But it can show the pdf with AcroPDF (on another form), so it does access Acrobat.

This is a critical application. Any help would be very appreciated. Thanks.
Question by:bobhwest
    1 Comment

    Accepted Solution

    We found the solution. There is a profile file in Terminal Server that controls each user's access. We deleted that file and the other users were able to use the system.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    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

    PaperPort is a popular document imaging/management product from Nuance Communications ( It is in widespread use by both individuals ( and businesses (http:/…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    We often encounter PDF files that are pure images, that is, they do not have text characters, but instead contain only raster graphics. The most common causes of this are document scanning software and faxing software/services that create image-only…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    758 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

    13 Experts available now in Live!

    Get 1:1 Help Now