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.
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.