Word 2007 - How to disable Close button?

M

Marecki

Hi, I was sent here by moderator of MSDN's VSTO forum...

I'm currently working on Word 2007 automation using Interoperability
library. I need to somehow disable Close button (and maybe also Minimize and
Maximize buttons) of Word Application. I found that in previous Word versions
it was possible to use Windows API function: EnableMenuItem. In 2007 it
doesn't work this way.

I already tried to use DocumentBeforeClose event and setting Cancel to true,
but it only takes care of closing is chosen from menu. Close button doesn't
fire this event.

Maybe someone had the same problem and knows the solution? I'll be very
grateful for any help.
 

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