Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Advanced Features
  New Posts New Posts RSS Feed - ObjectBridge and Word 2003
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedObjectBridge and Word 2003

 Post Reply Post Reply
Author
Message
GeoffG View Drop Down
Groupie
Groupie


Joined: August 02 2005
Location: Australia
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote GeoffG Quote  Post ReplyReply Direct Link To This Post Topic: ObjectBridge and Word 2003
    Posted: March 28 2006 at 3:36pm
I have a program which uses ObjectBridge to control the opening of a Word Document & then waits for the document to close before transferring control back - the relevant code is below:

* ACTIVATE WORD APPLICATION
CALL ATINVOKEMETHOD(WORDOBJECT, 'Activate', '', '', ERROR, OPTIONS)
IF ERROR#'' THEN GOSUB 9000; GOTO 999
* ENABLE DOCUMENT Close EVENT
CALL ATSETEVENT(DOCOBJECT, 'Close', 1, ERROR, OPTIONS)
IF ERROR#'' THEN GOSUB 9000; GOTO 999
CALL ATSETPROPERTY(WORDOBJECT,'WindowState',1,ERROR,OPTIONS)
IF ERROR # '' THEN GOSUB 9000; GOTO 999
* WAIT FOR Close EVENT
CALL ATGETEVENT(OBJID, EVENTNAME, ARGS, 0, ERROR, OPTIONS)
IF ERROR#'' THEN GOSUB 9000; GOTO 999
CALL ATENDEVENT(OBJID, EVENTNAME, ARGS, ERROR, OPTIONS)
IF ERROR#'' THEN GOSUB 9000; GOTO 999

If you make a change to the Word doc and then click on Close or the x button, you are asked if you want to save the document. You click on Yes & control passes back to the program. This works fine in Word 2000 or before.
However, in Word 2003, when you click on close, control passes straight back to the program. Word still asks if you want to save the doc, but ObjectBridge thinks that the document has been closed.
Is there some setting for Word or the ObjectBridge code to make it wait for the Save changes window?

Geoff
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.