I am trying to get all existing Ribbon tabs in a word document programmatically using C# code.
But I couldn't find any method to do it. Can someone show me how to do that using C#?
It is not possible to get a list of information about the Ribbon, whether the tabs or the commands listed in a group or menu. There is no interface exposed to the Developer that provides this information. By design, much of the Ribbon is not exposed except to a "container" that customizes the Ribbon... and then primarily what's relevant to customizing.
The menu command mentioned in the question lists only the built-in tabs, not any custom ones that might be added. This information could, possibly, be picked up using the Accessibilty APIs, but it's not certain...