I am using windows forms web browser
control in my forms application and having issues with displaying .doc
or .docx
file.
All the pdf files seems to work fine but when I select word file it comes up with file down load dialog with open, save and cancel options.
The code I am using here is
Try
If (dlgOpen.ShowDialog() = DialogResult.OK) Then
If (File.Exists(dlgOpen.FileName)) Then
wbPreview.Navigate(dlgOpen.FileName)
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
Then I tried using Microsoft WebBrowser
control as describes in How to use the WebBrowser control in Visual Basic to open an Office document where I ended up with the same issue.
Any ides of working this out?