Solved

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

Posted on 2012-03-29
8
2,244 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
Comment Utility
How is your browser set to display PDFs?
0
 

Author Comment

by:Pelegrinus
Comment Utility
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
Comment Utility
You can open Acrobat Reader, goto Edit>Preferences..., select Internet and check Display PDF in browser.
0
 

Author Comment

by:Pelegrinus
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

762 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

6 Experts available now in Live!

Get 1:1 Help Now