Specifying what to open a PDF with from an OLE field.

Posted on 2006-04-07
Last Modified: 2012-06-22
Here's an interesting one that is driving me insane.

Access2003 with Windows XP.

I have a direct scan and save function that enables the user to press a button which scans a document, converts it to PDF and saves the result in an ole field. When the user opens the PDF from the ole field the document opens fine in Acrobat Reader, but when the user closes down the file, the following message appears.

"The operation on the Acrobat document failed.
The OLE server may not be registered.
To register the OLE server, reinstall it."

It has no effect on the document or the application and the user is able to reopen the document at will without a problem. But each time the document is closed, the error above appears.

There are two real questions here.

1. Has anyone experienced this problem or know why it is happening?
2. Rather than open the ole field in Acrobat reader, is there any way I can get the ole field activation to use Internet Explorer to view the PDF instead?

Many thanks
Question by:martmac
    LVL 39

    Accepted Solution

    AFAIK, there is no work around for this when you store pdf files as ole objects.   If you check EE and other Access sites, you will see many posts from experts that say do not use ole fields.  Not only do you get prblems like this but your database will bloat tremendously.  I bet each ole/pdf file increases the size of the database by about 1 mb when the actual pdf file is only about 40-70 kb.  The best solution for this and other problems that will pop up is do not use ole fields for anything but very small graphics files like icons.  Instead save the pdf file outside of Access and create a text field to store the path/name of the file.  You would use:
    Shell "Path/name to Accrobat" & " " & path/name of the file
    to open in Accrobat.

    2. Rather than open the ole field in Acrobat reader, is there any way I can get the ole field activation to use Internet Explorer to view the PDF instead?
    Yes, but only if you have stored the pdf outside of Access as above.   Create an unbound ole container control with Internet Explorer in it.  Address the imbedded IE to the pdf link.

    Here is a utility that might get the ole files you already stored out of Access (I am not sure it will work with pdf files).

    Author Comment

    Many thanks, I rather thought this was the answer. I am accutely aware of the ole issue, but have faced real problems in relation to sharing documents due to significant networking restrictions that led to the ole choice. I have needed to get to grips with this for some time and I think now is the time to do it.

    The app will make it much easier to get the files out, so it's time to take a stiff drink and deal with the reality of a long overdue decision.

    Thank you for your help.

    LVL 39

    Expert Comment

    If the networking sharing restrictions make it dificult to access the external files, then you can store the data within Access as raw BLOBs.  Not a trivial task (don't understand why M$ has never provided built in BLOB support like their competitors do).  Here are some references:

    Glad to help.
    Happy Computing!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    760 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

    12 Experts available now in Live!

    Get 1:1 Help Now