WebBrowser: detecting/controlling Word Docs, PDFs, etc.

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I'm using a WebBrowser control in my .NET application to display Word
documents, PDF's, etc... which I want to be able to simply Print (on
request) and Close when finished with (otherwise Word holds control of the
document, even when the WebBrowser object is closed).
(I'm developing in VB.NET, although any examples in C# are also very
welcome.)

I'm having real trouble working out the following things...
- how to detect what application has been loaded into the WebBrowser.
- how to call methods on the application once detected.

Although I can access the DOM for Word Documents, any attempt to run a
method ("Close" in particular) results in a COM exception of "(0x800A11FD):
This method or property is not available because this document is in another
application".

I'm starting to pull my hair out... so any help is greatly appreciated,
Tom :-)
 
Apologies, but I'm bumping this in the hope that somebody who knows an
answer didn't see it originally!!
 
Back
Top