Use the startFromScratch attribute.
<customUI xmlns="
http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<officeMenu>
--
Jim
| On May 22, 3:12 am, "Nick Hodge"
| > Jaydeep
| >
| > You will need to write XML (RibbonX) to the file in you add-in.
| >
| > You can check here for ideas
| >
| >
http://www.nickhodge.co.uk/2007files/customiseribbon.htm
| >
| > and here
| >
| >
http://msdn2.microsoft.com/en-us/library/aa338202.aspx
| >
| > --
| > HTH
| > Nick Hodge
| > Microsoft MVP - Excel
| > Southampton, England
| > (e-mail address removed)
| > web:
www.nickhodge.co.uk
| > blog (non-tech):
www.nickhodge.co.uk/blog/<
[email protected]>
wrote in message
| >
| > | >
| > > Hi,
| >
| > > I want tohideMenuBar/ToolBar in Excel 2007 programmatically. I am
| > > using Excel COM componentTExcelApplicationin Borland C++ 6.0.
| >
| > > Please let me know the code/tricks to do this.
| >
| > > Thank You,
| > > Jaydeep Chovatia
|
| Hi Nick,
|
| Thanks for the quick response.
|
| I got success in hiding the menu items using the solution give at:
|
http://msdn2.microsoft.com/en-us/library/aa338202.aspx
|
| Following code i have written in xml file to hide File menu items
| -------------------------------------------------------------------------------------------------------------------
| Start Code
| -------------------------------------------------------------------------------------------------------------------
| <?xml version="1.0" encoding="UTF-8"?>
| <customUI onLoad="Ribbon_Load"
| xmlns="
http://schemas.microsoft.com/office/2006/01/customui">
| <ribbon>
| <officeMenu>
| <button idMso="FileNew" showImage="false" visible="false"/
| >
| <button idMso="FileOpen" showImage="false" visible="false"/
| >
| <button idMso="FileSave" showImage="false" visible="false"/
| >
| <button idMso="FileSaveAs" showImage="false"
| visible="false"/>
| <button idMso="FileSaveAsMenu" showImage="false"
| visible="false"/>
| <button idMso="FilePrint" showImage="false"
| visible="false"/>
| <button idMso="FilePrintMenu" showImage="false"
| visible="false"/>
| <button idMso="FileProperties" showImage="false"
| visible="false"/>
| <button idMso="FileClose" showImage="false"
| visible="false"/>
| <button idMso="MenuPublish" showImage="false"
| visible="false"/>
| <button idMso="FileSendMenu" showImage="false"
| visible="false"/>
| <button idMso="FilePrepareMenu" showImage="false"
| visible="false"/>
| </officeMenu>
| </ribbon>
| </customUI>
|
| -------------------------------------------------------------------------------------------------------------------
| End Code
| -------------------------------------------------------------------------------------------------------------------
|
| Above code successfully hides all the menu items for main menu "File",
| but i also want to hide all the main menus including "View", "Insert",
| "Formula",.....
|
| Can you please suggest me code which will hide main menus like "View",
| "Formula","Home",... as well as their sub menus like Home->Copy, Home-
| >Paste,.....
|
| Thank You,
| Jaydeep Chovatia
|