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.
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)
Is it possible to take a pre-existing button from the ribbon, Shape Fill from the Shape Styles category for example, and display it in a VBA userform?
My add-in manages a large number of shapes, and I would like to allow the user to style those shapes based on the category that they are in in the add-in.
I have read that a color dialog does not exist for us to use in VBA, so I'm trying to think of a way to work around that. Recreating all of the fill, outline, and effects menus seems like too much, there has to be a better way.
No, built-in ribbon controls can be used on the ribbon only. As a workaround you may consider using any ActiveX custom controls on your form.
Also you may consider creating a custom UI on the ribbon. In that case you will be able to add built-in ribbon controls to your own tab by specifying its idMso value. The full list of control IDs can be found in the following documents:
Office 2010 Help Files: Office Fluent User Interface Control Identifiers
Office 2013 Help Files: Office Fluent User Interface Control Identifiers
Office 2016 Help Files: Office Fluent User Interface Control Identifiers
Read more about the Fluent UI (aka Ribbon UI) 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)
Two years ago, a client, using Word 2010, asked me to create a template with an extra tab for the Ribbon Bar containing some special buttons linked to the template's VBA.
They are now moving over to Word 2013 and want me to update their template to 2013 (i.e. removing the Compatibility Mode as well as adding a couple of extra buttons to their specialized tab. At this stage I have only updated their template to 2013 and not added any more buttons to their Ribbon tab. I have also put their updated template in the correct folder where all the templates are kept in my system.
I asked them to send me a document created in their 2010 version of the template, opened it in my 2013 version and found that TWO specialized tabs are added to the Ribbon Bar: one from their 2010 version and the other one from the 2013 version.
Can anyone advise me, please, whether they are stuck with two specialized tabs whenever they open documents created earlier in Word 2010 or is there something I can do in the 2013 version to prevent this?
By the way, I use the Office Custom UI Editor for the XML work.
It is not clear what XML markup you use for Word 2010 and 2013 templates. Are they different? Why do you need to have different custom UI?
You can read about the Fluent UI (aka Ribbon UI) in the following series of articles in MSDN:
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 distribute a Word template with a large VBA code base in it. The template includes a menu, and for Word 2007/2010 users, a ribbon tab. In Word 2013, everything still works fine via the menu, but the ribbon is not showing up. I still code in VBA without using Visual Studio (and don't want to buy VSTO). So i'm trying to figure out how to update my ribbon code/xml or whatever it is I need to do to make my ribbon tab show up in 2013.
The ribbon is copied into a new document from the template when a user creates a new document based on the template. But something's going wrong with that process in Word 2013.
Interestingly, if I open a document that was previously created from my template (in Word 2010), the ribbon displays and works fine. But if I create a new Word 2013 document from the template, the ribbon is not there.
There must be something I need to do in my code to tell Word to display the ribbon in new documents based on my template, but I haven't been able to find that information.
I've always generated my ribbon using "Office Custom UI Editor," which is not available for Word 2013; that tool "inserts" the xml into the template. My ribbon XML starts with this:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="SERibbon_Load">
<ribbon startFromScratch="false">
<tabs>
Anybody know how to make my ribbon tab work with Word 2013?
Well, it turns out that there really isn't a problem with my ribbon or code. The installer code that installs the template installs both a ".dot" template (without a ribbon) for users with Word 2003 or earlier, and a ".dotm" template (with ribbon) for more recent versions of Word. It then sets up a shortcut to the template on the user's start menu.
The installer code isn't recognizing that Word 2013 was installed, and is concluding that the user is using Word 2003, and thus creating a shortcut to the ribbon-free version of the template. I changed the shortcut to point to the ".dotm" version, and all is well. So it turns out that my custom ribbon tab works fine in Word 2007/2010/2013. I just had to fix my installer to detect Word 2013 (version "15" in the registry) is installed.
The namespace apparently changed in 2010, but is backward compatible with 2007. 2010 added things to the namespace, 2013 added new things, but my understanding is that it's the same schema, and thus also backward compatible with Word 2007 ribbon definitions.
G
I haven't done this yet, myself, but check out this thread from msdn: http://social.msdn.microsoft.com/Forums/en-US/officegeneral/thread/6575cee8-796a-40da-9520-24c5161f7600.
It looks like the namespace is the same, but some attribute values may have changed. You may have want to check against the documentation to see if your ribbonXML is in compliance: http://www.microsoft.com/en-us/download/details.aspx?id=727.
I am developing an outlook 2007 add-in which is based on an existing outlook 2010 plugin. I managed to get most of the features working, because most of them were backwards compatible. However there are some I could not, because 2007 simply did not have certain features. \
Backstage view
Main ribbon
My question is - what would you suggest for an equivalent interface? Where would you put in outlook 2007 something that was in backstage view in 2010?
After much deliberation I decided to use a custom menu. All features available through the backstage view in 2010 will be converted to menu items in the custom menu in Outlook 2007.
Also buttons from the main ribbon will become items in the same custom menu.
This solution, while not as elegant as Fluent UI will work, I think, because all of my plugin's functionality will be available from one spot.