Add togglebutton to QAT and remove from custom tab

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Add togglebutton to QAT and remove from custom tab

Post by Robie »

Hi

Is it possible to create a *toggle* button on QAT and *not* show it on the custom tab?

I have a custom tab with various button and one them is a togglebutton. But, my superiors think that that the togglebutton should be in QAT and not on the custom tab :-(. Don't ask me why. Is it possible to do this?

Thanks
Robie

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Add togglebutton to QAT and remove from custom tab

Post by Rudi »

Any button that is on the ribbon can be added to the QAT.
Just right click on the button in the custom tab and choose Add to Quick Access Toolbar
1.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Add togglebutton to QAT and remove from custom tab

Post by Robie »

Rudi wrote:Any button that is on the ribbon can be added to the QAT.
Just right click on the button in the custom tab and choose Add to Quick Access Toolbar
1.jpg
Thanks Rudi.

I understand I can do that - no problems. In fact, i have added some buttom from standard tabs to QAT (such as Track Changes).

I need to add a *toggle button* to QAT or define a toggle button as part of QAT - that is the problem

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Add togglebutton to QAT and remove from custom tab

Post by Rudi »

What must it toggle?
Is it a macro button that is supposed to trigger a macro of sorts?
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Add togglebutton to QAT and remove from custom tab

Post by Robie »

Rudi wrote:What must it toggle?
Is it a macro button that is supposed to trigger a macro of sorts?
Yes absolutely. It is a simple macro that set a global variable TRUE or FALSE. This golbal variable value is taken into account by other macros (which are working fine and defined in the custom tab).

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Add togglebutton to QAT and remove from custom tab

Post by Rudi »

You should be able to use the Word Options > Quick Access Toolbar dialog for that.
Select the macro category and add the appropriate macro to the QAT in the right side window.
1.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Add togglebutton to QAT and remove from custom tab

Post by Robie »

Rudi wrote:You should be able to use the Word Options > Quick Access Toolbar dialog for that.
Select the macro category and add the appropriate macro to the QAT in the right side window.
1.jpg
Thanks Rudi. Very useful.

PJ_in_FL
5StarLounger
Posts: 1098
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: Add togglebutton to QAT and remove from custom tab

Post by PJ_in_FL »

Robie,

Are you asking how a button on the QAT can change APPEARANCE when run to reflect the current state of a setting the button changes?
PJ in (usually sunny) FL

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Add togglebutton to QAT and remove from custom tab

Post by Robie »

PJ_in_FL wrote:Robie,

Are you asking how a button on the QAT can change APPEARANCE when run to reflect the current state of a setting the button changes?
Yes, I was.

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Add togglebutton to QAT and remove from custom tab

Post by Rudi »

This is way out of my league...but see if you can source some info from these two web pages to try and get it right...

-- http://gregmaxey.mvps.org/word_tip_page ... _text.html
-- http://addbalance.com/word/ribbonmodification.htm
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Add togglebutton to QAT and remove from custom tab

Post by Robie »

Rudi wrote:This is way out of my league...but see if you can source some info from these two web pages to try and get it right...

-- http://gregmaxey.mvps.org/word_tip_page ... _text.html
-- http://addbalance.com/word/ribbonmodification.htm
Thanks Rudy. I will take a look.

PJ_in_FL
5StarLounger
Posts: 1098
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: Add togglebutton to QAT and remove from custom tab

Post by PJ_in_FL »

Robie wrote:
PJ_in_FL wrote:Robie,

Are you asking how a button on the QAT can change APPEARANCE when run to reflect the current state of a setting the button changes?
Yes, I was.
AFAIK, "NO". Not in the QAT. There is no access to the QAT in the Excel object model.

My experience is with Excel 2007, and there were changes in the Ribbon UI in Excel 2010 and beyond, but I'm not aware of any way VBA can access and modify the Ribbon UI programmatically.

If you can get hold of Excel 2007 Power Programming by John Walkenbach (or a later edition), he has code to create a custom floating toolbar using a Userform and Windows API calls.

I'm using that UI for an add-in I'm creating. Similar to what you're asking for, I use the .SpecialEffect property to change the buttons to appear "pressed" when activated using

Code: Select all

MyControl.SpecialEffect = fmSpecialEffectSunken
when pressed and

Code: Select all

MyControl.SpecialEffect = fmSpecialEffectFlat
when not pressed.

John's code automatically shows the buttons as "raised" when mouse'd-over. My technique maintains the mouse-over changes, while maintaining and showing the normal or pressed state when the mouse is somewhere else.

Edit: All the above works (or doesn't) the same in Word as Excel. MS crippled the UI the same way for both applications. :sad:
PJ in (usually sunny) FL