Solved

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

Posted on 2012-03-29
8
2,274 Views
Last Modified: 2012-03-30
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?
0
Comment
Question by:Pelegrinus
  • 4
  • 2
  • 2
8 Comments
 
LVL 33

Expert Comment

by:Norie
ID: 37782428
How is your browser set to display PDFs?
0
 

Author Comment

by:Pelegrinus
ID: 37782710
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.
0
 
LVL 33

Expert Comment

by:Norie
ID: 37782908
You can open Acrobat Reader, goto Edit>Preferences..., select Internet and check Display PDF in browser.
0
 

Author Comment

by:Pelegrinus
ID: 37783252
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.
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37783459
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
0
 

Author Comment

by:Pelegrinus
ID: 37783626
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?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 37783767
LOL!
I believe we are referring to the same thing.

Over the past 10 years I have seen at least 4 different (syntax) ways to do this.
..Basically, you just pick the one that works for you...
;-)

But again, I have never actually seen the webbrowser controlsource property used, (Because the control is typically used to display "Web" data,)

So since .Navigate will work in either case (Disc files or web pages), then most people will just stick with that .Navigate...

;-)

Jeff
0
 

Author Comment

by:Pelegrinus
ID: 37787309
Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

932 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