Disable ribbon item through Interop

D

dctuck

Hi,
I am creating an application - not an AddIn - that creates a Word
application, then opens a file. I need to be able to somehow disable the save
/ saveas buttons on the Office Button menu. Is it possible to load a custom
Ribbon xml file when creating a solution such as this, or is this only
available in AddIns / VSTO scenarios, or is there some other way to access
these buttons, such as how previously you could disable CommandBar controls?

Thanks for your help
Daniel
 
C

Cindy M.

Hi =?Utf-8?B?ZGN0dWNr?=,
I am creating an application - not an AddIn - that creates a Word
application, then opens a file. I need to be able to somehow disable the save
/ saveas buttons on the Office Button menu. Is it possible to load a custom
Ribbon xml file when creating a solution such as this, or is this only
available in AddIns / VSTO scenarios, or is there some other way to access
these buttons, such as how previously you could disable CommandBar controls?
There is no way to affect the Ribbon content from something running out-of-
process. The ribbon customization must be part of a document file or be defined
by an Add-in.

What you can do is trap the BeforeDocumentSave event.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
D

dctuck

Thanks for your reply - that's pretty much the conclusion I'd come to - it's
annoying that this is no longer possible; I'm sure MS had a good reason for
doing it though....... maybe.......
 
C

Cindy M.

it's
annoying that this is no longer possible; I'm sure MS had a good reason for
doing it though....... maybe.......
I think "good" is a matter of perception, in this case. Depending on where
you're coming from, it could be perceived as good or bad. You might find
Jensen Harris's blog of interest. He wrote about a lot of what went into the
decisions in the Ribbon design during the Office 2007 Beta days.

Http://blogs.msdn.com/jensenh/

One big reason behind the Ribbon design was outside applications (this
includes Add-ins) making "unexpected" changes to the UI. The Office team
wanted to limit and get some control over this because everything unexpected
and "bad" that was happening was being perceived as part of the Office
application and being blamed on Microsoft.

FWIW I completely understand this assessment. I've worked in on-line support
on CompuServe, in the newsgroups and in forums for almost thirteen years.
Complaints along the lines of:
- I can't find button X
- My customizations have been lost
- Button x no longer works

And myriad variations on these themes grew more and more frequent over the
years as developers discovered the Office applications as a platform for their
applications. Unfortunately, not all of these developers adequately understood
how the Office applications were designed to be used or worried about being
"polite" about "sharing" the UI with anyone (even the user).

With the current restrictions in the Ribbon interface, the user can always
quickly and easily find out whether what he's seeing belongs to the Office
application, or to which *in-process* add-in something belongs. And he gets
instructions on how to disable whatever-it-is if it's interfering with his use
of the application.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top