(unknown charset) COM events

From: (unknown charset) unknown charset) Алекс <">
Date: Thu, 26 Aug 2004 21:18:44 +0400

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






Received on Thu Aug 26 2004 - 19:18:44 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:39 UTC