[Migrated content. Thread originally posted on 18 November 2002]
Since things are only starting, I'm posting in the main thread for now. Hope that's okay.When using OLE automatition (or ActiveX), there doesn't seem to be a way to handle external (foreign) objects that are required as arguments for some OLE/ActiveX methods.
Example: When using Word Automation (OLE), I'd like to add some fields in a document. To do this, I need to use method Document.Selection.Fields.Add, this method required a range as first argument. The problem is that the range object doesn't seem to be willing to be held in a USAGE HANDLE variable.
Basically what I am trying to do is (by heart, so probably not compilable):
inquire word-app @Selection in word-sel.
inquire word-sel @Range in word-range.
modify word-sel @Fields::Add(word-range, 0, "REF somebookmark", 0).
That's the basic idea. The problem is that the range object doesn't seem to be willing to be casted to an ACUCobol handle or back. Any suggestions?