Problems with displaying PDF on Web Browser Control in Access Form (1 Viewer)

alihussain

New member
Local time
Today, 04:08
Joined
Jul 1, 2020
Messages
19
I created a form with a text box which gonna hold the path and will the get the path from VB code public function and call the function from a command button,
Web Browser Control data source = text box and it works fine with displaying pictures but when i tried to display pdf a message box pops up with 2 options save and cancel and i will attach some files to you guys also this happens with office documents but with open, save and cancel options, also when i open a word document, for example, it will start in a new window, not in WBC

Any help would be appreciated.
 

Attachments

  • Capture.PNG
    Capture.PNG
    17.5 KB · Views: 16
  • Capture1.PNG
    Capture1.PNG
    14.2 KB · Views: 13

Isaac

Lifelong Learner
Local time
Yesterday, 17:08
Joined
Mar 14, 2017
Messages
2,733
You may have to research what Internet Explorer options to be changed for handling PDFs. A web browser control is like a miniature internet explorer, and comes with some of the same ... challenges. Alternately, it might be a setting in Adobe reader client to allow I.E. handling of PDFs.

I have no experience trying to display a Word document in a web browser control (?) and will let someone else chime in on that..
 
Last edited:

Micron

AWF VIP
Local time
Yesterday, 20:08
Joined
Oct 20, 2018
Messages
3,471
Path to what? File? URL?
If a file, maybe you should be using a bound object control. However IIRC that will open the file with its native app, which maybe you don't want. I forget if an unbound object control will do that or not and I can't check right now.
 

arnelgp

error reading drive A:
Local time
Today, 09:08
Joined
May 7, 2009
Messages
10,858
see if this will help, but i doubt on PDF.
since i use windows 10, i cannot host the pdf inside the webbrowser control.
words, excel can be hosted.
 

alihussain

New member
Local time
Today, 04:08
Joined
Jul 1, 2020
Messages
19
@arnelgp thx for the help but it's the same thing nothing changed except for Office Documents.
So is there a way to display PDF inside Access Form rather than using WBC?
 

arnelgp

error reading drive A:
Local time
Today, 09:08
Joined
May 7, 2009
Messages
10,858
if you are using x32 use adobe.
 

alihussain

New member
Local time
Today, 04:08
Joined
Jul 1, 2020
Messages
19
So we can say this is a dead-end we can't display a pdf and documents inside access form???
 

arnelgp

error reading drive A:
Local time
Today, 09:08
Joined
May 7, 2009
Messages
10,858
maybe if you can install x64 adobe. i only have x32 adobe to test.
 

Isaac

Lifelong Learner
Local time
Yesterday, 17:08
Joined
Mar 14, 2017
Messages
2,733
So we can say this is a dead-end we can't display a pdf and documents inside access form???
One of the niftiest apps I've created was in the healthcare domain and used by processors, processing incoming Medicare applications that had been received by digital fax. I displayed all of the application, took screenshots and displayed supporting/supplemental documents, all using an Access form with a Webbrowser control. It works fine. You just have to work through the things I mentioned. It has to do with how Internet Explorer handles PDF, and possibly each client's Adobe Reader settings. If you work these issues out correctly (may take some trial and error), you will not get "Save or Open" when telling your webbrowser to display a PDF.
Here is one set of options you may need to ensure are checked to get you started...this is Adobe Reader > File > Preferences

I use Windows 10 and have no problem displaying PDF on Webbrowser forms in Access currently. If you want to give up at this point that is your decision of course but you have a lot more to check on before knowing it won't work.

adobe settings.jpg
 

alihussain

New member
Local time
Today, 04:08
Joined
Jul 1, 2020
Messages
19
First thing thx you guys for your help !!!
@pisorsisaac@gmail.co well i tried many things rly but I think I found the problem and its my adobe or my PC idk exactly but when tried on my laptop it works ...but it's open in adobe program not inside access form so I'm not getting save or open message, and thx to @arnelgp i downloaded WebBrowserControl.reg from the link u provided and i can now display office documents inside access form and yes i will keep trying and trying until i find a solution for this problem
 

Isaac

Lifelong Learner
Local time
Yesterday, 17:08
Joined
Mar 14, 2017
Messages
2,733
Sounds good - remember internet explorer options, and adobe reader preferences..the answers are there (as far as the PDF goes).
Best of luck.
 

vhung

Member
Local time
Yesterday, 17:08
Joined
Jul 8, 2020
Messages
159
I created a form with a text box which gonna hold the path and will the get the path from VB code public function and call the function from a command button,
Web Browser Control data source = text box and it works fine with displaying pictures but when i tried to display pdf a message box pops up with 2 options save and cancel and i will attach some files to you guys also this happens with office documents but with open, save and cancel options, also when i open a word document, for example, it will start in a new window, not in WBC

Any help would be appreciated.
Microsoft Web Browser and Adobe Reader could connect to PDF links
(it is nice to attempt to open pdf on access webcontrol )
>but pdf would not totally work in access
>office document like word, excel could be open on access if you use the other version of Office (can find through "installed office controls" office)
i use this before but when i install diffrent version of ms.access does not work anymore
>in some ways if you can convert word and pdf to html you could simply open your file to access web browser
 

Attachments

  • officedoc.png
    officedoc.png
    21.6 KB · Views: 12
  • pdfweb.png
    pdfweb.png
    235.3 KB · Views: 11
Last edited:

vhung

Member
Local time
Yesterday, 17:08
Joined
Jul 8, 2020
Messages
159
it is nice to attempt to open pdf on access webcontrol
>but pdf would not totally work in access
>office document like word, excel could be open on access if you use the other version of Office (can find through "installed office controls" office)
i use this before but when i install diffrent version of ms.access does not work anymore
>in some ways if you can convert word and pdf to html you could simply open your file to access web browser
Make use of Adobe Reader
>install it and reactivate office/windows using KMS
>then make a Form for pdf viewer
>see attachment...
 

Attachments

  • PdfViewer.png
    PdfViewer.png
    528 KB · Views: 10

Users who are viewing this thread

Top Bottom