Is there a PowerPoint equivalent of Word's ToggleRibbon? Or another way to accomplish the same thing?

240 Views Asked by At

[In Office 2007+, you can cause the ribbon to be minimized so that only the tab names are shown, which makes it look a bit like a menu bar. The full ribbon is then only shown when you click on a tab. This ribbon state is what I'm trying to control.]

In the Word 2007+ object model, there's a ToggleRibbon method on the Window object, that minimizes (or not) the ribbon for that window.

I'm looking for an equivalent method in PowerPoint 2007+, and I can't find one. Is there such a thing, and if not is there another way to achieve it? Apart from using SendKeys, that is - don't go there.

1

There are 1 best solutions below

9
On

i have implemented in c# with word addins .

you can take help from below link:
http://msdn.microsoft.com/en-us/library/bb608590.aspx

I have added a button in the ribbon(visual).
in the button click, i have added following code.

 private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            Globals.ThisAddIn.Toogle();
        }

i have added these code in the ThisAddIn.cs:

 public void Toogle()
        {
            Word.Window obj = Application.ActiveWindow;
            obj.ToggleRibbon();
        }

sorry, Window.ToggleRibbon() is present only in word. even it is not present in excel or work. so achieve this, do the following code :

 private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            SendKeys.SendWait("^{F1}");
        }

Hope , this will work for you.