Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    Unanswered: Minimising the Ribbon

    I have just started looking at playing around with the ribbon in VBA, and have learned enough that it is a blooming nightmare.

    I am scaling down my plans. I think that I would be satisfied with minimising the ribbon. To do this I think I either need to:
    1) Read the registry to see the current ribbon state and conditionally use Send Keys to minimise the ribbon if it is currently maximised (yuck)
    2) Download some tool from MS, read a heck of a lot of documentation, create some XML and paste it into the document XML (double yuck)

    Are these basically my options? Is there something much simpler I am missing?

    Thanks
    poots
    Testimonial:
    pootle flump
    ur codings are working excelent.

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Depends on what your goal is.

    When the ribbon is minimised, should user(s) be able to restore it and do you want the associated shortcut key functionality disabled too?

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Yes
    No
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    1. Yeah, this option is pretty sucky.

    2. The RibbonX option isn't so bad. All you have to do is set the the startFromScratch attribute to true:
    HTML Code:
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
        <ribbon startFromScratch="true">
        </ribbon>
    </customUI>
    You could just use notepad for this but the Office '07 custom UI editor you mentioned does make life easier.

    3. A third option is to use an old Excel 4.0 macro
    Code:
    Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",false)"

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    thanks Colin

    Forgot to mention (in fact the ramifications have only just struck me now) that this would be run in 2003 compatibility mode. As such, I had late binding in mind but of course when it comes to the XML I'm stuffed.

    Option 3 doesn't cut it either - I want to minimise not remove.

    Thanks for your help - you've confirmed what I thought
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi pootle,

    As I'm sure you know (but I should point out in case anyone takes me up on it), option [2] code I posted doesn't hide the ribbon either.

    Option 1 it is then?

    Roll on Office 2010 (hopefully it will be exposed in the object model)!

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    I didn't so thanks for clarifying.

    It does seem very odd that the ribbon isn't just exposed by the object model. On the whole I still find the ribbon a real barrier as a user, and this is after a year of using 2007. Annoying to find it is even worse from the perspective of a developer!
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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