Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

What causes the WebBrowser control to pop up a Save dialog rather than just show an MHTML document?

$
0
0

Bizarre behaviour of a WebBrowser control.

We wrote a DLL that shows a WPF form containing a WebBrowser. We use this for showing "Previews" of various types of documents.

When we do this for a Word Document or an Excel Spreadsheet, we use a 3rd party product to convert the original document to an MHTML document. This document is simply saved somewhere in the %localdappdata% folder. After that we produce a URI from the File Path of the MHTML document and we go .Navigate.

This works perfectly fine when we call this "Previewer" control from one of our own Assembly.

But we also include the same DLL as part of an Outlook Add-in. Some of our users - I believe these are users using Outlook 365 - are reporting a bizarre problem. When we invoke the .Navigate method for the MHTML document we created, instead of showing it in the WebBrowser like it does when we call it from our own Assembly, when we call it from our Outlook Addin the .Nagivate leads to the WebBrowser popping up a Save dialog.

Why might this be happening and, more importantly, is there anything I can do about it?


Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>