Link to home
Start Free TrialLog in
Avatar of Pelegrinus
PelegrinusFlag for United States of America

asked on

WebBrowser Control in Access 2010 opens PDF file in Acrobat, not in form

In Access 2010, I created a test form with a single control, a WebBrowser control. The control has a valid PDF file as its control source: ="F:\My Data Sources\TestDocs\TestFile01.pdf".

When I open the form, the file is displayed in Acrobat X (V. 10.1.2) and nothing shows in the Webbrowser control.

How can I get the PDF to display directly in the form's webbrowser control rather than in Acrobat?
Avatar of Norie
Norie

How is your browser set to display PDFs?
Avatar of Pelegrinus

ASKER

In my IE browser, I typed in the location of the file as shown in my original post and it opened the file in Acrobat. I'm looking to see how I can change that, but any recommendations on how I can do it would be appreciated.
You can open Acrobat Reader, goto Edit>Preferences..., select Internet and check Display PDF in browser.
I've now tried that, with no luck. But, on a "dare," I downloaded Acrobat Reader, even though I have a working Acrobat X application working well. Immediately after I installed Reader, both the IE browser and my WebBrowser control display PDF files directly. I don't know exactly what I fixed, but I now have a working application. Thank you for your help.
FWIW...

No need to set a cotrolsource of the web browser...

"Navigate" to the file instead:

Me.WebBrowser0.Navigate "c:\YourFolder\Yourpdf.pdf"

This works with the reader of the full version, ..no need to install both if you don't have to...
(Remember the full version is big $$$, and not all machines my have it installed)

JeffCoachman
Is there a difference between a web browser object and a web browser control object? I seem to have the ability to use only the web browser control object, and I have to use the syntax:

me.WebBrowser0.Object.Navigate "PathAndFile"

Are we talking about the same things?
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!