Found this in our code which maybe your issue

    // Augmentation from FlexCOM20_Base.pkg to try and resolve bug where vComObject is occasionally 'null' and not 00000
    // Attach the DF object to com automation object via progId.
    Function AttachActiveObject Returns Boolean
        Variant vComObject
        String sProgId
        Boolean bSuccess

        Get psProgID to sProgId
        Get ComActiveObject sProgId to vComObject
        Move (IsComObject(vComObject)) to bSuccess
        If (bSuccess) Begin 
            Set pvComObject to vComObject
        Function_Return bSuccess
If it returns false then I call CreateCOMObject