Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-21-2016, 09:28 PM   #1
Supertension
Newly Registered User
 
Join Date: Dec 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Supertension is on a distinguished road
ActiveX Web Browser Control

Hi,

I've have put a Microsoft Active X Web Browser control into an Access form and use the following code when the form loads:

Private Sub Form_Load()
MyPlace = "C:\test.pdf"
Me.WebBrowser0.Navigate MyPlace
End Sub

This works well and the pdf file is displaced in the control.

It also works well when I change MyPlace to jpg file or a web page.

What I also want to do is display a Word document within the browser but when I change MyPlace to "C:\test.docx", I get a message asking whether I want to open or save the Word file. I click 'open' and Word itself opens outside of the browser control and opens the file. A message in the control tells me navigation was cancelled.

Can anyone help me to display the Word document within the browser control? I really need to be able to do this as part of the development of a larger project.

Thanks

Supertension is offline   Reply With Quote
Old 04-22-2016, 12:30 AM   #2
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,720
Thanks: 3
Thanked 2,082 Times in 2,037 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: ActiveX Web Browser Control

What happen if you open a doc file?
I think this article may be of interest!
https://support.microsoft.com/en-us/kb/982995
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
Old 04-22-2016, 09:52 PM   #3
Supertension
Newly Registered User
 
Join Date: Dec 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Supertension is on a distinguished road
Re: ActiveX Web Browser Control

Thanks JHB. The problem is there for doc files as well and for xls and xlsx files. I tried the link you suggested and tried to run the easy fix download but got a message saying the fix didn't apply to my operating system or application. I'm running Windows 10 and IE 11.
I'll keep searching the web and post a solution if I find one but I'm new at all this and it may take me some time.
Any help in the meantime would be much appreciated.
Thanks

Supertension is offline   Reply With Quote
Old 04-22-2016, 10:18 PM   #4
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: ActiveX Web Browser Control

there is a section on that page "let me fix it myself", just follow the instruction.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
Supertension (04-24-2016)
Old 04-23-2016, 12:15 AM   #5
JHB
Have been here a while
 
Join Date: Jun 2012
Location: In the south of Denmark (Jutland), near the German border.
Posts: 7,720
Thanks: 3
Thanked 2,082 Times in 2,037 Posts
JHB has a spectacular aura about JHB has a spectacular aura about
Re: ActiveX Web Browser Control

Quote:
Originally Posted by Supertension View Post
Thanks JHB. The problem is there for doc files as well and for xls and xlsx files. ..
Try the attached database and Test.doc.
Attached Files
File Type: zip TestDoc.zip (23.3 KB, 94 views)
__________________
If the above post has helped you, why not take the time to say thank you, by pressing the "Thumbs up."
JHB is offline   Reply With Quote
The Following User Says Thank You to JHB For This Useful Post:
Supertension (04-24-2016)
Old 04-23-2016, 09:45 PM   #6
Supertension
Newly Registered User
 
Join Date: Dec 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Supertension is on a distinguished road
Re: ActiveX Web Browser Control

Thanks. I tried the DB posted by JHB but got the same problem - Word itself opens in a separate window. I'll try the "let me fix it myself" route suggested by arnelgp. It might be a few days before I can try.
Supertension is offline   Reply With Quote
Old 04-24-2016, 09:12 AM   #7
Supertension
Newly Registered User
 
Join Date: Dec 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Supertension is on a distinguished road
Re: ActiveX Web Browser Control

I tried the "let me fix it myself" route suggested by arnelgp and it works perfectly. Thanks for all your help.


Supertension is offline   Reply With Quote
Reply

Tags
access , activex , browser , word

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Microsoft Web Browser to PDF (automatic) deltaportugal Modules & VBA 0 09-29-2014 04:29 PM
Web Browser ActiveX Control doulostheou Modules & VBA 12 07-28-2014 03:18 AM
ActiveX Web Browser & passing authentication kevin_Carr Modules & VBA 0 07-21-2012 10:48 AM
Need help ASAP - VBA & ActiveX web browser napoleonjones Modules & VBA 1 03-31-2010 08:32 AM
Putting the Web Browser Control in another control darbid Forms 0 03-15-2009 10:35 AM




All times are GMT -8. The time now is 04:32 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World