Web Browser Control

A

accessuser1308

I have placed a web browser activex control on a form in my database. I am
trying to make the web browser display a word document using the following
code (In On Open event)...

Me.WebBrowser8.Navigate URL:="c:\file.doc"

I have also tried Me.WebBrowser8.Navigate ("c:\file.doc")

When the form is opened I get a message box asking me if I want to open,
save, or cancel the file. If I select open a Microsoft Word is opened. If I
select save it saves the file to the specified location. Cancel does just
what it says.

My question is this...Is there a way to view the word document in the web
browser control? I would rather not have to save the word document as html.
 
K

Klatuu

Why do you want to use a browser? There are at least two better ways to do
that. One would be to use the path to the file and open it with the
FollowHyperLink method. The other would be to use the Shell statment to open
an instance of Word.
 
A

accessuser1308

I want the document to be on the form. I do not want to have to flip between
different applications to read the document.
 
P

Paul Shapiro

You can use an OLE control instead of a WebBrowser control. Use VBA to load
the Word doc into the ole control.
 
A

accessuser1308

This is what I currently use. I just don't like the delay while the document
opens while navigating between records.
 
P

Paul Shapiro

You could try either a) not loading the document until the user clicks a
button or b) open a copy of Word and keep it hidden. That would help if the
delay is due to Access starting up a new Word instance for each record. You
would need to test carefully to make sure the Word instance does not remain
open, and you don't start more than one yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top