A few menu/buttons were disable/greyed in my Word-2007 OLE Applica

L

LeonXYZ

Dear Sir,

I have Word 2007 installed on my computer, The word application is embeded
in my own applcaiotn.I tried to compare two documents using automation with
the following code. but I got an COleDispatchException with error message
"This command is not available." the exception is caught when excuting
"Compare" method.
I check the embeded-Word-GUI inside my application, to my surprise,
the "Compare" button in "Reivew Tab of Word Ribbon" is disabled/Greyed !

I think it must be the same reason that "Compare" button is greyed/disabled
as the compare method throw an Exception "This command is not abailable".

I just wonder that is there any functionaly restriction for an Word-OLE ?
How can I check the cause for disabling the "Compare" button ? What's the
best article/book for me to Fix the problem ? Any help is appreciated.

Thanks a million.
 
C

Cindy M.

Hi Leon,

I have to wonder if it's because the application window is embedded? By
default, Word wants to display each document in its own application window.
The command you want to use would open the result in an additional application
window, which is probably not supported when the application is embedded.
I have Word 2007 installed on my computer, The word application is embeded
in my own applcaiotn.I tried to compare two documents using automation with
the following code. but I got an COleDispatchException with error message
"This command is not available." the exception is caught when excuting
"Compare" method.
I check the embeded-Word-GUI inside my application, to my surprise,
the "Compare" button in "Reivew Tab of Word Ribbon" is disabled/Greyed !

I think it must be the same reason that "Compare" button is greyed/disabled
as the compare method throw an Exception "This command is not abailable".

I just wonder that is there any functionaly restriction for an Word-OLE ?
How can I check the cause for disabling the "Compare" button ? What's the
best article/book for me to Fix the problem ?

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 :)
 
L

LeonXYZ

Hi Cindy,

What's the windows message for the Compare,
It might be that in the application there is no associated message item for
Compare in the MFC message, so the Compare menu/button is disabled ?

Thanks a lot
 

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