saving documents using AxWebBrowser embedded Word

  • Thread starter Andreas Leitner
  • Start date
A

Andreas Leitner

Hi,

I have Word embeded in a C# application using AxSHDocVw.AxWebBrowser.
As the documentation suggests I open the Word document using
"AxSHDocVw.AxWebBrowser.Navigate", then react to the OnNavigateComplete2
event to gather the Word document object. Accessing
'document.Application' works fine and I can call methods on
'document.Application'. Problem is
I cannot do so on the document itself. The runtime would through an
exception that says:

"This method or property is not available because the document is in
another application."

Is there a way to work around this?

What I really want to do is to save the document I opened via
"AxSHDocVw.AxWebBrowser.Navigate", without a message box poping up
asking the user whether he really wants to save the document. (This is
what happens if I were just to "Navigate" to "about:blank" to close the
document.

So my idea was to close or save the document myself, before navigating
to "about:blank", but as reported above, it doesn't work...


any help is greatly appreciated,
Andreas
 

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