For Each rt As RibbonMenu.Tab In RibbonTabs For Each rg As RibbonMenu.Group In rt.Groups For Each rb As Object In rg.Items Dim dr As DataRow = DataTables("菜单表").AddNew() dr("RibbonTabs名称") = rt.Name dr("RibbonTabs标题") =rt.Text dr("Groups名称") =rg.Name dr("Groups标题") =rg.Text dr("Items名称") =rb.Name 'dr("Items标题") =rb.Text Next Next Next