Jump to content

Process -Close winword


Scripta
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Correct , Legitim User !

have 2002 .

????? sill banging the wall !

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...