Currently I have extended Excel with:
(1) VBA code.
(2) XML code using "Custum UI Editor for Microsoft Office" in which I customize the Ribbon.
I am also working with Visual Studio Community 2017, where I have some project coded in VB.NET. However, I am not at all familiar with C# or other languages.
My customizations in Exccel include dynamic menus as well as added build-in groups to custom tabs, so I don’t think I can use the "Ribbon designer".
I have been testing a little with Visual Studio for customizing the Ribbon of Excel, but the VBA code gives me problems with referencing to e.g. current selections of cells in Excel:
Private Sub FormatTusindtals0(control As IRibbonControl)
Selection.NumberFormat = "#,##0"
End Sub
And now I wonder whether Visual Studio is a better tool than the "Custum UI Editor for Microsoft Office" for customizing the Ribbon?
Any input to whether VS2017 is a better choice than "Custum UI Editor for Microsoft Office" – and how to get all my VBA Subs and Functions to work in VS2017 is very appreciated!
THANKS!
Related
I have created a macro that will set the categories of out going mail without needing to open the tag dialog. I have added the macro to the ribbon via the "Customize Ribbon" options on outlook itself. That macro works fine, however I would like the button to be highlighted (toggled on) when the category is set and then regular (toggle off) when the category is no longer set.
I only have basic VB knowledge but have good knowledge of java so the concepts are familiar just not the syntax. This is also the first macro I've ever done.
I have tried searching Google and Stack for an answer but I think due to my lack of knowledge I'm not using the correct keyword to get a useful result.
Thanks for the help.
VBA macros don't allow creating a custom ribbon UI. You need to develop a COM add-in if you want to customize the Fluent UI by adding a toggle button to the Outlook window.
Take a look at the following articles 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
The Fluent UI is described in depth in the following series of articles:
Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
I have researched to death and am really stuck. I am using Visual Studio 2017 to develop an excel ribbon. How do I get it to refer to the active sheet? I do see the Activate() function but no examples of how it is used and I have tried a few things now. I just need an example and I can be on my way.
Developing an addin for Microsoft Office 2007 onwards (client requirements, yuck) but I am rusty with my VB. I am using Visual Studio 2008 to create the addin for all 3 major programs; Word, Excel and PowerPoint.
I was wanting to set a condition to rename the Tab inside of the Ribbon depending on what version of office they were running. But I have searched everywhere and cannot seem to find a way to accomplish this? I don't quite understand what Ribbon XML is and how it differs from the visual designer.
It would be great to get some explanation of how to access elements of the Ribbon and change them depending on the Application Version (whenever I try to reference Application.Version VB doesn't seem to know what I am talking about)
I can clarify more however any help including 'where to look' would be much appreciated, thank you :)
Is it possible to automatically add a button to Excel Ribbon to run a macro when a user open an Excel file. Problem is I have developed a macro and would like to share it with my group members. Now on my personal computer I could customize the ribbon and assign a given button to my macro but this ribbon customization will only be available for me. So after I send out the workbook to members of my group, they will not see the button that I have assigned for the macro. I could add an ActiveX control but this will be on the sheet itself and not on the ribbon (Excel 2010)
Is there a way to do this, without having each member customize his/her ribbon.
Thanks!
I think that you are talking about VSTO, which is the add-ins framework of MS Office, and normally, you need the VS Studio, not Express, to develop your add-ins application.
And at first, you can go to http://msdn.microsoft.com/en-us/library/bb410115%28v=office.12%29.aspx to read the simple guide about the Ribbon button integration, and about other integration way and method, you can read the MSDN directly.
And of course, as a professional VSTO developer, if need, I can help you too. :)
Looking for Migration from Office 2002 - VBA Word Doc Application to Office 2007.
Issues: Though Office 2007 Supports VBA Application - VB Macro Code, Menu Bars are not appearing. Indeed, VBA Macro Menus display under "Add-ins".
On a study, I realized Office 2007 Supports XML - Ribbon. Is there any ideal approach to migrate VBA Macro Application to Office 2007?
Your best bet would be these two MSDN articles: Customizing the 2007 Office Fluent Ribbon and Creating a Custom Tab by Using Ribbon XML, although they look like they focus on doing it across all applications, rather than just one. There help docs for each Office app, to get them all try this Google query: site:msdn.microsoft.com office 2007 add button to ribbon.
This snippet, from the first link, should be what you're looking for:
What About Existing Solutions?
In previous versions of Office, developers used the command bars object model to build the Visual Basic code that modified the Fluent UI. In the 2007 release of Office, this legacy code continues to work in most cases without modification. However, changes made to toolbars in Microsoft Office 2003 now appear on an Add-Ins tab. The type of customization that appears depends on the original design of the add-in. For example, Office creates a Menu Commands group that contains items added to the previous menu structure (such as the File menu, the Insert menu, and the Tools menu). Office also creates a Toolbar Commands group that contains items added to the previous built-in toolbars (such as the Standard toolbar, the Formatting toolbar, and the Picture toolbar). In addition, custom toolbars that are added by an add-in or document appear in the Custom Toolbars group on the Add-Ins tab.