public void vendorAdd(string name) { //open session to add vendor QBSessionManager sessionManager = new QBSessionManager(); sessionManager.OpenConnection("appID", "Create Vendor"); sessionManager.BeginSession("", ENOpenMode.omDontCare); IMsgSetRequest messageSet = sessionManager.CreateMsgSetRequest("US", 13, 0); IVendorAdd vendorAddRequest = messageSet.AppendVendorAddRq(); vendorAddRequest.Name.SetValue(name); //add vendor // name is the string passed from the list containing the vendors that need to be added to quickbooks IMsgSetResponse responseSet = sessionManager.DoRequests(messageSet); sessionManager.EndSession(); sessionManager.CloseConnection(); for (int i = 0; i < responseSet.ResponseList.Count; i++) { IResponse response = responseSet.ResponseList.GetAt(i); var code = response.StatusCode; string code2 = code.ToString(); string code3 = response.StatusMessage; if (response.StatusCode > 0) { } // MessageBox.Show(code3); } }