Skip to main content

ribbon Element

This element is used to reference the Ribbon of the application and its contents.

Parent Elements

Child Elements

  • contextualTabs (List of Contextual Tab Sets)
  • officeMenu (Office Menu)
  • qat (Quick Access Toolbar)
  • tabs (List of Tabs)

startFromScratch attribute

Specifies that the application's built-in ribbon UI is reduced to a minimal set of features, providing a clean slate on which to build custom UI.

startFromScratch is optional and has a default value of false.

true means to show only your tab in Excel.

false means to show your tab and all the other tabs.

For example, the following XML code only show MyTab when the custom UI is loaded:

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
	<ribbon startFromScratch="true">
		<tabs>
			<tab id="customTab"
			     label="MyTab">
				<group id="customGroup"
				       label="Pictures">
					<button id="InsertPictures"
					        label="Insert Pictures"
					        imageMso="PictureInsertFromFile"
					        size="large"
					        onAction="InsertPictures"/>
					<button id="DeletePictures"
					        label="Delete Pictures"
					        imageMso="Delete"
					        size="large"
					        onAction="DeletePictures"/>
				</group>
			</tab>
		</tabs>
	</ribbon>
</customUI>

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>