Search code examples
c#.netoutlookvstooffice-addins

Disable Close button of window - VSTO - Outlook


I need to disable the close window button in a specific case, but I don't know how to do it. Is there a way to do this?


Solution

  • The Outlook extensibility model doesn't provide anything for that out of the box. You may try using Windows API functions to subclass Outlook windows, but this is not really a supported scenario - you do everything on your own risk. See SetWindowsHookEx for more information.