Modify

Opened 12 years ago

Closed 12 years ago

#2216 closed Bug (Wont Fix)

_WordAttach to closed Word doc crashes latest beta but OK for latest stable

Reported by: Tippex Owned by:
Milestone: Component: Standard UDFs
Version: 3.3.9.4 Severity: None
Keywords: _WordAttach Cc:

Description

_WordAttach to an already closed Word document crashes latest beta (application terminated)with the following error:

"C:\Program Files\AutoIt3\beta\Include\Word.au3" (228) : ==> Variable must be of type "Object".:
$o_windows = $o_Result.Application.Windows
$o_windows = $o_Result ERROR
->14:52:13 AutoIT3.exe ended.rc:1

It is tolerated in latest stable (production) version.

The purpose of the code that follows is just to make doubley sure that Word has successfully exited, both by attempting to attach to it and by killing its process.

$Word.Quit

$oWordApp = _WordAttach("I:\" & StringLower($CmpNameCode) & "\" & StringTrimLeft(@YEAR, 2) & "_" & @MON & "_" & @MDAY & "\" & $PackageLine & ".doc")

If Not @error Then

_WordQuit($oWordApp, -1)

EndIf

; Will return the PID or 0 if the process isn't found.

$PID = ProcessExists("WINWORD.exe")

If $PID Then ProcessClose($PID)

$Word = ""

The application crashes if beta compiled and $Word.Quit has succeeded but not if it has been compiled with the latest stable.

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by trancexx

  • Component changed from AutoIt to Standard UDFs

comment:2 Changed 12 years ago by water

  • Resolution set to Wont Fix
  • Status changed from new to closed

Bad coding style. Close the document and check if it was successfull. If it was then there's no need to double check.
As the Word UDF is being rewritten we won't fix this.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.