|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
WebBrowser: detecting/controlling Word Docs, PDFs, etc.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!! Show quote "Tom" <tomhartlandRE***@ETHISgmail.com> wrote in message news:44ace81d$0$69360$ed2619ec@ptn-nntp-reader01.plus.net... > 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 :-) > |
|||||||||||||||||||||||