Word automation in Webbrowser

  • Thread starter Thread starter Paul Bromley
  • Start date Start date
P

Paul Bromley

I am trying to automate Microsoft Word in the Webbrowser and have used the
sample at http://support.microsoft.com/default.aspx?scid=kb;EN-US;243058 can
some kind soul tell me the syntax to close the Instance of Word hat is
opened?

I have tried
oDocument.Application.Close & oDocument.Application = Nothing

Where might I find some documentation on automation in the Webbrowser?

Best wishes

Paul Bromley
 
oDocument.Application.Exit
______________________________________
The Reaper Grim
 
Unfortunately:-

An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'Exit' on type 'Application' not
found.
 
Oooppss.... sorry... my memory obviously isn't as good as it used to be!!!
It's oDocument.Application.Quit
_________________________________
The Grim Reaper
 
Hi,


Unfortunately I had tried this and got the following.

An unhandled exception of type 'System.Runtime.InteropServices.COMException'
occurred in microsoft.visualbasic.dll

Additional information: This method or property is not available because
this document is in another application.

I woner if this is because it is being hosted in the Webbrowser control?

Maybe I should be looking at the processes and then killing Winword.exe as
an option. Not sure how to do this and will look into it.

Thanks for your help. I would be grateful of any other options as I do not
want folk having instances of Word lying around open.

Best wishes

Paul Bromley
 
¤ Hi,
¤
¤
¤ Unfortunately I had tried this and got the following.
¤
¤ An unhandled exception of type 'System.Runtime.InteropServices.COMException'
¤ occurred in microsoft.visualbasic.dll
¤
¤ Additional information: This method or property is not available because
¤ this document is in another application.
¤
¤ I woner if this is because it is being hosted in the Webbrowser control?
¤
¤ Maybe I should be looking at the processes and then killing Winword.exe as
¤ an option. Not sure how to do this and will look into it.
¤
¤ Thanks for your help. I would be grateful of any other options as I do not
¤ want folk having instances of Word lying around open.
¤

Have you tried closing the document instead of attempting to terminate Word?


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Hi Paul,

I found that the DsoFramer OCX to be a far better solution to my problem.

Many thanks

Best wishes

Paul



 
Back
Top