Open 'Insert Hyperlink' menu in Excel office Add-in - excel

I want to open the 'Insert Hyperlink' menu programmatically without right clicking the cell.
https://stackoverflow.com/questions/48985342/open-insert-hyperlink-menu-in-excel-through-a-clickable-shape#:~:text=Application.Dialogs(xlDialogInsertHyperlink).Show
this link shows the way to achieve this in vba, is there a similar way for opening hyperlink menu in Excel office Add-in?

There is not yet an Office JS API similar to the Application.Dialogs API in VBA that can be used by an add-in to open Excel dialogs. Please consider logging a request for this API in the Microsoft 365 Developer Community.
An alternative might be to have the add-in provide UI similar to the Insert Hyperlink dialog either in the task pane or in a dialog.

Related

Why doesn't my Shared Excel 365 sheet allow VBA buttons to work in the webpage version of the sheet?

My whole team uses Office 365. This is my first attempt using the online sharing 'co-authoring' feature in 365. I created a 5-6 person, team-use Excel spreadsheet as an ongoing check-off log for a common task. I put in VBA "Done" buttons for when a team member finishes a task.
The file is on our company's OneDrive online folder (which I read was a requirement for co-authoring to work), but when opened in a web-browser the macro buttons are disabled -see screenshot. The VBA button macros come back and work great only when a user clicks "Open in Desktop App" and works it directly from the app -see 2nd screenshot.
Is there a way for the macro buttons with their VBA code to work in the browser view of the spreadsheet?
Thanks for any suggestions!

How to capture custom button click event in outlook from excel?

I'm trying to control Outlook via Excel by VBA ofc.
My Excel code creates and XML that adds button to Message Ribbon.
The button's job is to save email to specific location given by Excel.
I cant run Excel macro from Outlook macro because you cant access VB Project of Outlook. It needs to be provided for couple of persons and this is hard to deploy and control. So I thought maybe I can capture click event of that button from excel. I've seen examples to capture Reply button but nothing else.
I'm looking for place in Outlook object where this information might be stored. And any help with that, different approaches are welcome as well.
It looks like you need to develop a COM add-in instead of VBA macro. First of all, you can't modify the Ribbon UI in Outlook from VBA macros as you do it in Excel. Second, VBA macros are not designed for distributing them on multiple machines. That is what COM add-ins were invented for. See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.
The following articles provide instructions on how to create a custom ribbon UI:
Walkthrough: Create a custom tab by using the Ribbon Designer
Walkthrough: Create a custom tab by using Ribbon XML

VBA - Custom Ribbon Tabs in MS Excel add-in

I develop, for our department, an MS Excel add-in that includes a custom ribbon tabs that shows up when user lunch the add-in and hide some MS Excel tabs that we do not needs.
This custom ribbon includes a quit function to unload the add-in.
The problem is that the company does provide some add-in with custom tab.
I would like to know, how I can hide temporary their custom tab and show them when the user quit out add-in.
You can simply enable/disable the company's add-ins, using:
Application.AddIns("name of the add in here").Installed = False
Of course, considering you know the other add-in names.

Is it possible to click buttons in the toolbar with macros in Excel 2010?

Is there anyway to make a macro that can click buttons in the tool bars of Excel? I'm using Excel 2010.
Here's how you can record a macro, which will capture your actions.
For Excel 2010:
http://www.dummies.com/how-to/content/how-to-record-a-macro-to-automate-tasks-in-excel-2.html
For Excel 2013:
http://www.dummies.com/how-to/content/how-to-record-new-macros-in-excel-2013.html
In your case, to take this even further, you can do coded UI testing right from Visual Studio. For what you are trying to do, this is even better than only trying to automate a button-click to fire a custom add-in.
Here is a way how you can achieve it with excel 2010:
File->Options->Quick Access Toolbar.
in the "Choose Commands From" list you click "Macros". Select the macro and click add.
If you want change the name of the button you can click "Modify".
Hope it will help you.

Custom Menu visible to one document in Excel

I have created customized menu and toolbar in MS Excel. I wanted to show this menu and toolbar to specific document only. When I open any other xls file, it shows that menu and toolbar.
MS Excel 2003
How to do that using vba-excel macro or any other way to do that?
If you need more information, please ask me.
Thanks :)
OK - so this website will help you:
http://www.ozgrid.com/VBA/custom-menus.htm
It actually works in Excel 2007 also, but adds the menu under the Add-Ins tab.
You basically need to access the code for ThisWorkbook in the VBA application. From there, you can modify the Application.CommandBars object to do what you need.

Resources