Solved

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

Posted on 2012-03-29
8
2,488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 34

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 34

Expert Comment

by:Norie
ID: 37782908
You can open Acrobat Reader, goto Edit>Preferences..., select Internet and check Display PDF in browser.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

690 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