open word document inside web browser control

megatronixs

Registered User.
Local time
Tomorrow, 00:37
Joined
Aug 17, 2012
Messages
719
Hi all,

It seems that finding information on how to show a word document inside a web browser control in a form is a hard thing to do.
I tried the below, but it just opens in a word window instead of the web browser objct in the form. Any clues where I go wrong?

Code:
Private Sub Command823_Click()
Dim sFileName As String
 
sFileName = "C:\files\doc_2015.doc"
WebBrowser2.navigate sFileName
End Sub

Greetings.
 
Browsers display HTML documents not Word Documents. You could either try to convert the Word Document to HTML with Word Automation or display the Word Document in the form as an OLE object.
 
hi Sneuberg,

I wass a few days absent. I will try this out and post back.

Greetings.
 

Users who are viewing this thread

Back
Top Bottom