Scripta Posted October 24, 2006 Posted October 24, 2006 I tried to close the application winword . nothing happens ! what is wrong ? Here is the script .. / the other part of the script works ...... ............ Const $wdFormatRTF = 6 If ProcessExists("WINWORD.EXE") Then ProcessClose("WINWORD.EXE") EndIf $word = ObjCreate("Word.Application") $word.visible = False $sFile = FileOpenDialog("Open Word File", @ScriptDir, "Word Doc (*.Doc)") $word.Documents.open($sFile) $word.Selection.TypeText( "november 26 " ) $word.Activedocument.SaveAs(@ScriptDir & "\resume.RTF", $wdFormatRTF ) $word.Application.Quit
cprowse Posted October 24, 2006 Posted October 24, 2006 Scripta, Seems to work fine here as well. Using some simple debug - is the script getting into the If statement (i.e. does it think the process exists?). Is the process running as the correct user? Is word popping up a dialog box of some kind (such as Save?) that is preventing windows from ending the process (not sure if this would even be the case - simple to test). What version of Word? (I tested on 2003) Kind Regards, -Chris
Scripta Posted October 24, 2006 Author Posted October 24, 2006 Scripta,Seems to work fine here as well.Using some simple debug - is the script getting into the If statement (i.e. does it think the process exists?).Is the process running as the correct user? Is word popping up a dialog box of some kind (such as Save?) that is preventing windows from ending the process (not sure if this would even be the case - simple to test).What version of Word? (I tested on 2003) Kind Regards,-ChrisCorrect , Legitim User ! have 2002 .????? sill banging the wall !
lod3n Posted October 24, 2006 Posted October 24, 2006 How about this?While ProcessExists("WINWORD.EXE") ProcessClose("WINWORD.EXE") Wend [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now