Hi All !
 
What can be wrong with this code?
("Word closed" never appears)
 
MODULE PrivWord;
    IMPORT Log := StdLog, CtlT, Word := CtlWord9;
    TYPE Events = POINTER TO RECORD (Word.DocumentEvents) END;
    PROCEDURE ( e: Events ) New(), EMPTY;
    PROCEDURE ( e: Events ) Open(), EMPTY; 
    PROCEDURE ( e: Events ) Close() ;
        BEGIN Log.String(" Word closed"); Log.Ln END Close;
    PROCEDURE Do* ( );    
        VAR 
            doc : Word.Document;
            events : Events; 
    BEGIN
        doc := Word.NewDocument();
        doc.Application().PUTVisible( TRUE );
        NEW( events );
        CtlT.Connect( events, doc );
    END Do;
END PrivWord.
 
Thanks.
 
Alexei Kraevskii

Bjb25