function CPOpenObj(ObjTypMask: Integer): IWPTextObj;
Checks which objects are open at the current position. Returns a IWPTextObj interface or null if no object is found. Use ObjTypMask=0 it will find any open object, otherwise the specified object type must match.
Note: Please don't forget to call ReleaseInt() with the returned interface at the end of your code.