Word 2000 and Progress

Hi

We have used the following code under 9.1d (Chui) to open a Word 97 document quite successfully (Windows 98).


However when running on another PC still under Windows 98, but with Word 2000
we get the following message

This file is in use by another application
normal.dot

we can close down/exit from normal.dot and go back into progress. The word document has updated correctly.

Any body any ideas?

Regards
Mike




define variable oWord as COM-HANDLE NO-UNDO.
define var rp-filenm as char format "x(50)" no-undo.
rp-filenm = "mcxbook.doc".



CREATE "Word.Application" oWord CONNECT TO rp-filenm NO-ERROR.
IF NOT VALID-HANDLE(oWord) THEN CREATE "Word.application" oWord.

oWord:Documents:Open(rp-filenm).


oWord:Visible = TRUE.

PAUSE 2 no-message. /* Allow you to actualy see the document before we kill it */


RELEASE OBJECT oWord.

oWord = ?.
/*
message "back into the program" view-as alert-box.
*/
pause 1 no-message.
 

alant

New Member
Give this a try

It has been a couple years, but give this a try. On the computer that is having the problem open up Word. Then go to Tools -> Macro -> Macros. A new dialog will come up. If normal.dot is displayed delete that macro. I believe the problem is when you have two different people try to access the same file at the same time.

I'm not sure how your application is working, but you will need to be able to know if that file is open already so someone else can not get in the file at the same time because this could cause the file to get corrupted. I have run into this in the past.
 
Top