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

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 :)
 
T

Tom

Apologies, but I'm bumping this in the hope that somebody who knows an
answer didn't see it originally!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top