If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Minimising the Ribbon

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-06-09, 12:40
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
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:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #2 (permalink)  
Old 11-06-09, 17:49
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
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?
Reply With Quote
  #3 (permalink)  
Old 11-09-09, 07:27
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Yes
No
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 11-09-09, 19:19
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
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)"
Reply With Quote
  #5 (permalink)  
Old 11-10-09, 07:43
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
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:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #6 (permalink)  
Old 11-10-09, 14:31
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 477
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)!
Reply With Quote
  #7 (permalink)  
Old 11-10-09, 19:06
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
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:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On