Show us some code. I think the UDF returns the COM handle, so it should just be a matter of refining the code.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.