Modify

#1946 closed Bug (Fixed)

_WordCreate Error?

Reported by: Anomalism@… Owned by: Jon
Milestone: 3.3.7.11 Component: AutoIt
Version: 3.3.7.9 Severity: None
Keywords: WordCreate Cc:

Description

But in 3.3.6.1 it can work.

Code:
$oWordApp = _WordCreate(@WorkingDir & "\" & $sFileName)
$oDoc = _WordDocGetCollection ($oWordApp, 0)
_WordDocFindReplace($oDoc, "<NO>", $sXQNo)

Error msg:
--> Word.au3 Error from function _WordDocOpen, $_WordStatus_InvalidObjectType
--> Word.au3 Error from function _WordDocGetCollection, $_WordStatus_InvalidObjectType
--> Word.au3 Error from function _WordDocFindReplace, $_WordStatus_InvalidDataType

Attachments (0)

Change History (10)

comment:1 by Jpm, on Jun 7, 2011 at 12:32:23 PM

The change occur in 3.3.7.8

in reply to:  1 comment:2 by Anomalism@…, on Jun 12, 2011 at 10:11:03 AM

Replying to Jpm:

The change occur in 3.3.7.8

You are right. It can not work in 3.3.7.8 yet.

comment:3 by Jpm, on Jun 13, 2011 at 9:15:21 AM

so use 3.3.7.7 (go to archive beta) until final correction being done.

in reply to:  3 comment:4 by Anomalism@…, on Jun 16, 2011 at 3:57:50 AM

Replying to Jpm:

so use 3.3.7.7 (go to archive beta) until final correction being done.

It can not work in 3.3.7.10 yet...

comment:5 by Jpm, on Jun 16, 2011 at 6:41:37 AM

I agree the ticket is not fixed. That's the reason I suggest you use 3.3.7.7 as the regression has been introduce in 3.3.7.8

comment:6 by Bob Anthony, on Jul 1, 2011 at 4:39:29 PM

AutoIt is now returning the object names without the preceding underscore. If following lines are changed in Word.au3 it works as expected.

		Case "application"
			If $s_Name = "_Application" Then $objectOK = True
		Case "document"
			If $s_Name = "_Document" Then $objectOK = True
		Case "application"
			If $s_Name = "_Application" Or $s_Name = "Application" Then $objectOK = True
		Case "document"
			If $s_Name = "_Document" Or $s_Name = "Document" Then $objectOK = True

comment:7 by Bob Anthony, on Jul 1, 2011 at 8:44:53 PM

As per discussion with tracexx, backwards compatibility is not required for internal functions within the standard UDF collection.

The code should be changed as follows:

		Case "application"
			If $s_Name = "Application" Then $objectOK = True
		Case "document"
			If $s_Name = "Document" Then $objectOK = True

comment:8 by Jon, on Jul 1, 2011 at 10:06:56 PM

Milestone: 3.3.7.11
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [6171] in version: 3.3.7.11

comment:9 by jessica.zhang@…, on Jun 11, 2014 at 1:51:50 AM

This information save me a lot.
But it's very hard find out the latest version of word.au3.
I had download the latest version of AutoIt, after install, there is no word.au3 module at all.
I got one from an old version of AutoIt install, and modify it based on this information.
It works on my Win7 now.
Thanks!

comment:10 by jessica.zhang@…, on Jun 11, 2014 at 1:51:51 AM

This information save me a lot.
But it's very hard find out the latest version of word.au3.
I had download the latest version of AutoIt, after install, there is no word.au3 module at all.
I got one from an old version of AutoIt install, and modify it based on this information.
It works on my Win7 now.
Thanks!

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.