Results 1 to 14 of 14
  1. #1
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post
    Our company is about to move from office 2003 to 2010.

    In Word 2003 created a style template which is used widely throughout the company. When creating a new document based on this style template, a bit of VBA runs in the Autonew function and loads an add-in from a separate file which contains all my macros. I did it this way to keep the (style) template separate from the macros. The macros add-in file contains the toolbars to access the macros, and these are then visible when the user creates a document based on the style template. The toolbars have icons which I created myself - they are essentially slightly modified versions of the standard icons, which I created in a simple free icon program. In Office 2003, if you right-click on a toolbar and select "Customize" you can actually copy and paste the icons, which is how I got started.

    I now have to move to Word 2010.

    I understand I am in a better position than those folks trying to customize the ribbon in Office 2007! But obviously my old toolbars now appear in a separate "Add-Ins" tab on the ribbon. I want to create a proper ribbon tab of my own in the macros add-in file which will be visible only when the add-in is loaded by the style template.

    I understand how to customize the office ribbon, but there's some things I don't understand.

    * it seems that if I create a new Group in the ribbon, this is then available for all word documents. In Word 2003, my custom toolbars were linked to the macros add-in and they only appeared when the user opened or created a document based on the style template (which in turn loaded the add-ins). How can I achieve similar behaviour in Word 2010? If I add a new ribbon tab based on the macros using the "Customize Ribbon" functionality, this tab is available for all word documents and if I open a document which is NOT based on the style template, I click on the buttons I naturally get an error message because the macros aren't available. This is annoying beacuse the tab would be useless for the majority of documents.

    * In Office 2003, the toolbars appeared automatically with the add-in. The user did not have to customize anything. In Word 2010, it seems that each user would have to set up their machine to show the new tab by customizing the ribbon on their local machine. Is there a way round this? I only want the tab to show up in the ribbon if the user opens a document based on the template. Can I achieve this?

    * Only a very limited number of icons are available and selectable from the "rename.." dialog in the "Customize Ribbon" window. How can I install or select other icons to use? Specifically, is there a way to get the icons from my Word 2003 toolbars and make them available for use in the Ribbon?

    hope you can help!!

    cheers
    Dominic

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Dominic,

    With the caveat that I haven't had much more than a quick play-around with the Ribbon in Word 2010, my understanding is that you're stuck with the problems as you describe them, in terms of wanting to set Ribbon customizations manually and have them associated only with a specific template.

    It seems that all of the fanfare preceding the release of Office 2010, about being able to customize the Ribbon manually, was a bit of a bait-and-switch. What was left out was that any customizations done this way, are application-wide, and can't be associated with specific templates. So while the new manual customization features for the Ribbon may be useful for an individual user working alone, they are useless for organizations where you need to distribute a standard set of Ribbon customizations across a group of users.

    For that, the situation remains the same as it was for Word 2007, which is that you'll have to resort to programming, in order to create Ribbon customizations like you describe.

    Gary

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I agree with Gary. The Word 2010 Ribbon customisation ability is so severely limited it is really no improvement over the 2007 lack of customisation. The customisations don't get saved into a template that I can see (not even Normal.dotm) so you can't export your customisations made this way to other users.

    However you can make great ribbons if you use third party tools and learn how it all hangs together.

    The best place to start is by using Andy Pope's RibbonX Visual Designer. This can be tricky to install and is a little obscure to work with since it is run from Excel and is only visible if you turn on the Developer Tab. On the up side this tool has immense capability and does everything that should have been built into Word 2007 and 2010.

    If you are comfortable with editing XML files in a text editor then you could also try CustomUI Editor. This tool provides a simple way to get into the xml file contained in a template and is the tool that I have been using for a couple of years. The problem with using this method is learning what you can and can't do since the XML is exceptionally sensitive to errors - if you make one mistake then the whole customisation doesn't load.

    Both tools allow you to specify custom buttons on the ribbon but you may need to load them separately into the template. You certainly need to do this manually using the CustomUI Editor but it is simple enough. It is easier to use one of the numerous icons already available in Word. The definitive list of these is found here - Office 2007 Icons Gallery. A useful blog page which describes how you might get started on this part of the puzzle is Ken Puls Blog
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post
    many thanks guys.

    I did some playing around yesterday and discovered the same thing: that i have to resort to XML and some third party utilities to customize the ribbon.

    I have to say that I made good progress, and managed to get my first ribbon button working and calling my old macro routines, by creating a wrapper for the public ones with the correct signature.

    The only thing I didn't get working is the icon. I used the Custom UI editor for 2010 and it put the icon .png file in the .dotm file, but unfortunately when I tried to open the .dotm file, it complained that it was corrupt. I will have to fiddle with this.

    But then it turns out that even if you get the icon file in the .dotm, you still need to add some code (somewhere, haven't figured this out yet) to load the images for your customised ribbon.

    I am comfortable with XML, VBA and VB, albeit in different environments, so I see how most of this fits together and it's not a big deal - but if you have any hints to clear up these remaining points, I'd be very grateful!

    cheers
    Dominic

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Sounds like you are progressing well. Here is another link that might NOW be useful for the custom icons
    http://gregmaxey.mvps.org/Ribbon_Custom_Icons.htm
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    New Lounger
    Join Date
    Apr 2004
    Location
    Seattle, Washington
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts
    It's not a big help, I know, but if you have a Word 2003 template (for instance, your old normal.dot) running as a Global Template (in 2007, at least -- haven't seen 2010 yet), some of the buttoned macros from that template, including their custom-created icons, will appear in a little space on the QAT, which can be accessed by adding the command "Custom Toolbars" to the QAT.

    I wrote about it some in http://bro.ws/772844L, and put in a little picture of mine.

    Judy

  7. #7
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post
    many thanks all.

    I have now got it sorted. I have a customised ribbon with my own icons which links to my macros. I don't think there are any more open points for - it's just a case of getting the arrangement of the ribbon groups and buttons arranged satisfactorily. This means I need to learn the properties that can be defined in the XML for buttons, groups, tabs etc. I guess this info is in the XML schema, which I am now off to find on the internet..

    The main issue I had was that this was all a major problem for Word 2007 and it wasn't clear to me if things had moved on in 2010. I guess the answer is "yes, but not much.".

  8. #8
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Dominic,

    I have [s]wrestled with[/s] done a great deal of work with custom ribbons, as many of the templates I've designed have had a user interface.

    You might also look at the book "RibbonX Customizing the Office 2007 Ribbon," which will also work for 2010. (At least so far that's been true for me -- there are a couple of new properties available in 2010.) It's by Robert Martin, Ken Puls (mentioned above for his helpful blog) and Teresa Hennig. It has a lot of code examples.

    Best,
    Kim

  9. #9
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts
    It is absurd that programming skills at this level (don't get me wrong, I'm grateful for all the deep knowledge presented here !) are needed to accomplish what many users could do for themselves in Word 2003, or IT support could easily produce for them and manage.

    Anyway, that's why we're sticking with 2003 here - the tangible organisational cost (in making changes, in re-educating users) will not be compensated by any touted benefits.

    Maybe we'll wait until Word 2020, hopefully by then MS might have realised that complex VBA programming is not in itself an organisational objective, and that productivity tools which take more support than they deliver in benefits will not sell in the longer run.

    Ribbons ? Bah !

  10. #10
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post
    Yes, it also takes quite a long time to build the new ribbons without any visual means of verifying. It takes a lot of hunting to find the lists of controls and built-in icons. It is also not possible to use custom icons for built-in controls - even if there is no built-in icon available (e.g. there is no icon for the command "paragraph keep lines together" and in Word 2003 I added a button to the toolbar and created my own icon - in Office 2010 this is not possible to achieve - you have to try to find a built-in icon that has been designed for another purpose, but which could be used for this one).

    Also, to understand all the attributes for the XML ribbon definitions you have to be able to firstly understand the XML schema and secondly you have to be able to find the control names / types (actually downloadable as docx files from microsoft).

    So far I have spent nearly 2 full days trying to recreate a couple of simple toolbars, plus you have to do additional programming to change the signatures of all the macro "subs" that are invoked. And I'm from a technical background.

  11. #11
    Lounger
    Join Date
    Dec 2009
    Location
    Manitoba, Canada
    Posts
    31
    Thanks
    0
    Thanked 4 Times in 2 Posts
    All of the complexities you mention are there in menu customizations, just hidden by lots of programming.

    This link might help in your quest:

    http://technet.microsoft.com/en-us/m...05.ribbon.aspx - A Guide to Customizing the Office 2007 Ribbon

    it has links lists of some of the hidden id's you are looking for and it includes this snip of information to help:
    <snip>
    4.8 SHARING YOUR CUSTOMIZATIONS
    You can save UI customizations in any 2007 Office system Word, Excel, or PowerPoint document, template, or add-in. What if you want to install your custom UI so it's available regardless of the document or template being used? This is also quite easy.
    In Word, just save the .dotm file that contains your macros and related customUI to the Word Startup folder and it will load automatically when Word starts.
    </snip>


    Over the last 3-4 years I've been collecting articles on the topic of Ribbon customization. So here it is, the link collection. It's pretty overwhelming, but there is a lot of good stuff in it (not just the links themselves, but they also have lots of links to great resources).

    Customizing The Ribbon
    1 Links & Resources Collection
    You can find more information about the topics discussed in this column at the following locations:
    • Add Classic Form Controls to Ribbon - http://gregmaxey.mvps.org/Classic%20Form%20Controls.htm
    • Change the Ribbon in Excel 2007 or Excel 2010 (very good, lots of links and example code) - http://www.rondebruin.nl/ribbon.htm
    • Compatibility of Legacy Solutions and Customizations - http://www.microsoft.com/downloads/e...DisplayLang=en
    • Creating Custom Ribbon Galleries in Excel 2007 - http://msdn.microsoft.com/en-us/libr...ice.12%29.aspx
    • Customize the Ribbon (It doesn’t take Rocket Science) http://gregmaxey.mvps.org/Customize_Ribbon.htm
    • Customize the Ribbon (It doesn't take Rocket Science) - http://gregmaxey.mvps.org/Customize_Ribbon.htm
    • Customizing Context Menus in Office 2010 - http://go.microsoft.com/fwlink/?LinkId=182186
    • Customizing the 2007 Office Fluent Ribbon for Developers - Part 1 of 3 Oct 2006 - http://msdn.microsoft.com/en-us/library/aa338202.aspx
    • Customizing the 2007 Office Fluent Ribbon for Developers - Part 1 of 3 - http://msdn.microsoft.com/en-us/library/aa338199.aspx
    • Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3) - http://msdn.microsoft.com/en-us/library/aa338202(v=office.12).aspx
    • Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3) - http://msdn.microsoft.com/en-us/library/aa338199(v=office.12).aspx
    • Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3) - http://msdn.microsoft.com/en-us/library/aa722523(v=office.12).aspx
    • Customizing the Office 2010 Backstage View for Developers - http://go.microsoft.com/fwlink/?LinkId=184245
    • Customizing the Word 2007 Fluent Ribbon Is As Easy As 1-2-3 (Part 1 of 2) - http://msdn.microsoft.com/en-us/library/cc501317(v=office.12).aspx
    • Customizing the Word 2007 Fluent Ribbon Is As Easy As 1-2-3 (Part 2 of 2) - http://msdn.microsoft.com/en-us/library/cc508991(v=office.12).aspx
    • Deploying a Customized Ribbon and Quick Access Toolbar in Office 2010 - http://go.microsoft.com/fwlink/?Link...47&clcid=0x409
    • Display and Hide Tabs, Groups, and Controls on the Microsoft Office Ribbon (Part 1 of 2) http://msdn.microsoft.com/en-us/library/ee390805(office.11).aspx
    • Display and Hide Tabs, Groups, and Controls on the Microsoft Office Ribbon (Part 2 of 2) http://msdn.microsoft.com/en-us/library/ee633442(office.11).aspx
    • Excel 2007-2010 Ribbon and QAT pages - http://www.rondebruin.nl/tips.htm
    • Galleries in the Ribbon - http://www.rondebruin.nl/galleries.htm
    • Guide to Customizing the Office 2007 Ribbon - http://technet.microsoft.com/en-us/m...05.ribbon.aspx
    • How to Build an Office COM Add-in by Using Visual Basic .NET - http://support.microsoft.com/kb/302896/EN-US/
    • How to Create Office COM Add-ins by Using VBA and Office Developer - http://support.microsoft.com/kb/306130/EN-US
    • http://gregmaxey.mvps.org/Ribbon_Ima...bels_Part1.htm
    • http://gregmaxey.mvps.org/Ribbon_Ima...els_PartII.htm
    • http://gregmaxey.mvps.org/Ribbon_Ima...ls_PartIII.htm
    • http://technet.microsoft.com/en-us/l.../ff468686.aspx
    • Information About Designing Office XP Add-ins and Office 2003 Add-ins by Using the .NET Framework - http://support.microsoft.com/?id=840585
    • Installing Add-Ins 2007 - http://www.andypope.info/tips/tip010.htm
    • Introduction to the Office 2010 Backstage View for Developers - http://go.microsoft.com/fwlink/?LinkId=182189
    • Office 2007 : Icons Gallery - http://www.microsoft.com/downloads/d...displaylang=en
    • Office 2010 : Icons Gallery - http://www.microsoft.com/downloads/d...9-d543c19d0eed
    • Office Development with Visual Studio Developer Portal - http://msdn.microsoft.com/en-us/office/aa905533.aspx
    • Office Fluent User Interface Developer Portal - http://msdn.microsoft.com/en-us/office/aa905530.aspx
    • Programatically customizing 2007 Office Fluent UI - http://msdn.microsoft.com/library/bb335359.aspx
    • Ribbon Extensibility in Office 2010: Tab Activation and Auto-Scaling - http://go.microsoft.com/fwlink/?Link...48&clcid=0x409
    • Ron's Excel Tips
    • Targeting User Interface Solutions to the 2007 and 2010 Releases of Microsoft Office - http://go.microsoft.com/fwlink/?LinkId=184298
    1.1 IMPORT 2003 TOOLBARS INTO RIBBON
    • Compatibility of Legacy Solutions and Customizations - http://www.microsoft.com/downloads/e...DisplayLang=en
    • DIY Custom Toolbar in Word 2007 - http://hdsurvivor.blogspot.com/2007/...word-2007.html
    • Icon Customization - http://en.allexperts.com/q/Microsoft...stomizaton.htm
    • Migrating 2003 macros and toolbars to 2007 - http://lounge.windowssecrets.com/ind...owtopic=772844
    • Use Word 2000/3 Toolbars in Word 2007 - http://www.gmayor.com/Toolbars_in_word_2007.htm
    1.2 RIBBON XML EDITORS
    • Custom Ribbon Icons - http://gregmaxey.mvps.org/Ribbon_Custom_Icons.htm
    • Custom UI Editor Tool download from the OpenXMLDeveloper.org The tool was written by Trang Luu who works on the Microsoft Office Fluent User Interface team and is one of the key developers of the Ribbon. The Custom UI Editor is specifically written to customize the Ribbon in Microsoft Office applications.
    • Customize the Office User Interface in Office 2010 - http://technet.microsoft.com/en-us/l.../ff468686.aspx
    • Documentation: Visual Studio Tools for Office - http://msdn.microsoft.com/en-us/library/d2tx7z6d.aspx
    • Forum: Visual Studio Tools for Office - http://social.msdn.microsoft.com/for.../vsto/threads/
    • RibbonX Visual Designer - Free Ribbon customizing tool - http://www.andypope.info/vba/ribboneditor.htm
    • RibbonX Visual Designer Add-in (made by Andy Pope) - http://www.andypope.info/vba/ribboneditor.htm
    • RibbonX: Customizing the Office 2007 Ribbon - http://www.amazon.com/RibbonX-Custom.../dp/0470191112 - Book
    • RibbonX: Excel 2007 VBA Programmer's Reference - - Chapter 14- - http://www.oaltd.co.uk/Excel2007ProgRef/Default.htm
    • XML Notepad 2007 - http://www.microsoft.com/downloads/d...displaylang=en is another free tool from Microsoft that you can use when writing XML code.

  12. #12
    Lounger rodsmine's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA, USA
    Posts
    35
    Thanks
    4
    Thanked 4 Times in 3 Posts
    Quote Originally Posted by dom_donald View Post
    ... It takes a lot of hunting to find the lists of controls and built-in icons. It is also not possible to use custom icons for built-in controls - even if there is no built-in icon available (e.g. there is no icon for the command "paragraph keep lines together" and in Word 2003 I added a button to the toolbar and created my own icon - in Office 2010 this is not possible to achieve - you have to try to find a built-in icon that has been designed for another purpose, but which could be used for this one).
    How about using text instead of an icon? In Word2003, I used Kn for keep with next and Kt for keep together; is this an option in the 2007/2010 versions?

  13. #13
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post
    Quote Originally Posted by Rodney Copeland View Post
    How about using text instead of an icon? In Word2003, I used Kn for keep with next and Kt for keep together; is this an option in the 2007/2010 versions?
    Yes it is an option, but not an ideal one - the ribbon generally has few "text only" controls. The main problem is that you just can't use customised icons for built-in controls, so if the control doesn't have an associated icon by default, then you can add one, but it has to be a built-in icon which originally had another purpose. This limitation didn't exist for 2003.

    Still, I think I've got it sorted now. I'll faff about with an XML editor until my company decides to give us all Visual Studio 2010 Pro so I can use the graphical ribbon editor and create an Add-in rather than a template with macros

  14. #14
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I get around the need to specifically create new macros just to allow me to run an existing macro by creating a catch all macro which takes the ribbon control.id or control.tag property for a macro name. This same principle can also be adapted along the lines of the following to allow you to run built-in commands from the ribbon AND apply your own icon.
    Code:
    Sub RunCommand(control As IRibbonControl)
      'allows the ribbon to run a built in command without direct access
      'macro located in the RibbonX module
      On Error GoTo ErrCatch
      If control.Tag = "" Then
        CommandBars.FindControl(ID:=control.ID).Execute
      Else
        Debug.Print control.Tag
        CommandBars.FindControl(ID:=control.Tag).Execute
      End If
      Exit Sub
    ErrCatch:
      MsgBox Err.Number & vbCr & Err.Description & vbCr & control.ID
    End Sub
    The ribbonx code would then look like this

    <button id="AlignLeft" label="Align Paragraph Left" onAction="RibbonX.RunCommand" image="myPict" screentip="Apply Left Alignment to the selection" />
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •