Reputation: 1
I am trying to open office files in AxWebBrowser control and i did it programmatically in vb.net. But during opening it shows file download dialog with open,save and cancel button so how can i setup it "Open" always instead clicking on it by mouse.
Upvotes: 0
Views: 314
Reputation: 2397
This happening because the Microsoft Web Browser control does not handle Office documents natively. What you have to do is load it in an ActiveX control within the webpage instead.
You could do something like this :
<script language="javascript">
function openDoc() {
var doc = new ActiveXObject("Word.Application");
doc.visible = true;
doc.Documents.Open("path.docx");
}
opeDoc();
</script>
Upvotes: 0