![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
GeoffG
Groupie
Joined: August 02 2005 Location: Australia Status: Offline Points: 43 |
Post Options
Thanks(0)
Quote Reply
Topic: ObjectBridge and Word 2003Posted: 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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |