1
votes

We are embedding a word control inside of a winforms app, and need to hide and disable the ribbon on Office 2007 and 2010.

Is it possible to hide/disable the office 2007/2010 ribbon programmatically using the office interop dlls? Is there another method available to do this?

3

3 Answers

2
votes

I don't think you can disable the ribbon as such, but using a custom XML file you can hide the default tabs, groups and commands (or add your own). Setting the custom XML file can be done via interop (see IRibbonExtensibility and GetCustomUI). This may not be perfect, but perhaps better than nothing.

2
votes

It is not possible to disable the Office 2007/2010 ribbon.

1
votes

In the user interface, Ctrl F1 will accomplish the hiding.

If you were able to send keys to the embedded app, that'd accomplish that.

System.Windows.Forms.SendKeys.Send("^{F1}");

More on SendKeys at MSDN.