Open button

Add-in Express™ Support Service
That's what is more important than anything else

Open button
Cannot handle 
Dorel Sops




Posts: 6
Joined: 2017-01-30
Hello, I'm not able to intercept / cancel action / hide the Open button (Excel 2016). I tried to find the solution on forums, but I only found it for Print (hiding):

https://www.add-in-express.com/forum/read.php?FID=5&TID=6479&MID=32250#message32250

but I did not succeed to write something similar for Open / New.


Is there a way to change the default Open functionality? I need to present my form to access a specific repository.
Posted 30 Jan, 2017 11:55:18 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Dorel,

What do you call "the Open button (Excel 2016)"? If this is the button demonstrated at http://www.gcflearnfree.org/excel2013/getting-started-with-excel/4/, this it is actually a tab, the IdMso of which is "TabRecent" (it reflects the evolution of the Excel UI). I refer to this tab as File | Open. In the same fashion, File | New is a tab IdMso="TabOfficeStart". You can find these IDs using the information we provide in section "Referring to built-in Office ribbon controls" at https://www.add-in-express.com/docs/net-ribbon-components.php#referring-built-in-ribbon-controls.

You can hide the File | New tab: put an ADXBackstageView onto the add-in module, use the visual designer to populate the component with a tab, set the tab's IdMso to "TabOfficeStart", set the tab's Visible property to False.

You can hide the File | Open tab in the same way. You can also add a custom task to the File | Open tab: put an ADXBackstageView onto the add-in module, use the visual designer to populate the component with a tab, set the tab's IdMso to "TabRecent", then follow instruction at https://blogs.msdn.microsoft.com/vsod/2013/04/05/customizing-office-2013-backstage/. When doing this, keep in mind that the <taskFormGroup> tag corresponds to a Task Form Group component in the visual designer; this applies to other tags as well.

Is this what you are looking for?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Jan, 2017 02:54:46 Top
Dorel Sops




Posts: 6
Joined: 2017-01-30
Yes, thank you for the fast and very useful reply.
Posted 31 Jan, 2017 04:06:52 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Jan, 2017 04:30:06 Top
Dorel Sops




Posts: 6
Joined: 2017-01-30
I have one more question. How can I access (hide / intercept) the "Browse" button. Apparently it is a Button, has the id "ButtonOpenBrowse" and the parent is an AdxBackstageTaskFormGroupCategory with id "ButtonCategoryRecentDocuments". But from the designer I cannot add buttons to the AdxBackstageTaskFormGroupCategory to use their properties.

Where am I wrong?
Posted 31 Jan, 2017 06:26:46 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Put an ADXRibbonCommand component onto the add-in module, set the component's IdMso to "ButtonOpenBrowse", and handle the OnAction event of the component.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Jan, 2017 06:34:35 Top
Dorel Sops




Posts: 6
Joined: 2017-01-30
Thank you for the answer. I already tried this, but it does not work. It seems this button is not a ribbon button. I'm speaking about the "Open/Browse", located after the "Recent, OneDrive, This PC, Add a Place".
Posted 31 Jan, 2017 07:01:00 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
You can try to hide the File | Open tab itself and create a custom one.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Jan, 2017 07:21:35 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
The below is a response to the question asked at https://www.add-in-express.com/forum/read.php?FID=5&TID=14346&MID=73526#message73526:

Dorel Sops writes:
Thank you for the answer, but this seems to not solve my problem. Firstly there is a office customization possible (add items from a list), which is lost, second, I cannot add my custom one click push button to reproduce the existing functionality of the browse (file open dialog). The problem is the same: I do not know the type of the "Browse" button, if this class is implemented or not. I tried to add manually a lot of kind of button type in the parent control, but no success. Please send me some details, I need them for the customer to argue what is possible and what is not (customer wants a customized open file dialog to access external repositories, but with no or minimal changes to the office UI; no changes means to capture / replace the browse button, minimal changes to add a one click button under the standard "Browse").

Does the "Browse" button has a class implemented in the add-in express or not? If yes, which is the corresponding class, if not is this an add-in express limitation, or an office one? If it is an ad-din express limitation, may we hope for a future version which implements it?


The Ribbon UI is an image combined of a number of smaller images; all of these are drawn by Office, not by me or you - the Browse button on the File | Open tab of the Backstage view of Excel 2016 is an example of such an image. Although you may refer to such an image as control, it isn't a control at all: it doesn't provide any property or event directly; you may influence its behavior using the Ribbon XML that Add-in Express generates for you; see e.XML in the OnRibbonBeforeLoad event of the add-in module.

To customize a built-in control/image, you must refer to the control by its IdMso value. You obtain such an IdMso from Microsoft; see section Referring to built-in Ribbon controls at https://www.add-in-express.com/docs/net-ribbon-components.php#referring-built-in-ribbon-controls.

Be aware that Microsoft publishes IdMso values for *some* of the built-in controls, not for all. Also, they don't spend much time on explaining what Ribbon areas are customizable. There are some documents describing how you can customize this or that area but these documents don't cover all the areas, plus each of the documents doesn't provide details.

In short, there's no guarantee that "ButtonOpenBrowse" is the IdMso of the Browse button. And although we describe a way to find the IdMso of a built-in control in section How to find the IdMso of a built-in Ribbon control at https://www.add-in-express.com/docs/net-ribbon-tips.php#find-idmso, there's no sure way to find the IdMso of any given control. BTW, I've used this approach to find that the IdMso "FileOpenUsingBackstage" doesn't influence the control in question.

Finally, I've just found that the button "ButtonOpenBrowse" was introduced in Excel 2013; the button's caption is "Browse More Files". I don't know the fate of this button in Excel 2016. I found this info using the text files mentioned in section Referring to built-in Ribbon controls.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Feb, 2017 08:07:48 Top
Dorel Sops




Posts: 6
Joined: 2017-01-30
Thank you for the very detailed reply. I was afraid of such an answer, but this is very useful for me, because it saves very much time for searches and experiments. I have also now a more precise view on the subject. So I will explain to the customer: the add-in express and office sdk are indented to add functionality, not to modify the existing one. Sometimes - by chance - this is possible, but more than a trick than a rule.

Best regards,
D. Sops
Posted 01 Feb, 2017 09:17:41 Top