Wow, thanks again for the explanation and the example! I'm working on that....and it starts beating....
By the way, after this: FDevice := GetActiveOleObject(OLE_OBJECT_NAME); how can i test that everything is ok and FDevice is valid ? something like: ok := FDevice <> nil; Roberto 2011/5/26 Ludo Brands <ludo.bra...@free.fr>: > Attached a small lazarus demo project that implements the EventSink unit. It > is based on the EventSink unit in the article and adapted for fpc. > The demo launches Msword and connects to the ApplicationEvents interface > {000209F7-0000-0000-C000-000000000046}. When you create a new document, or > change document, close word etc. in msword the app displays in a memo the > dispids received through the event sink. > > As you will notice, the dispinterface for the events interface just contains > the guid. No method prototypes are required. > > Ludo > > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal