Search code examples
c#vstooutlook-addin

How to implement an screen updating switch off for Outlook (vsto add-in)?


While processing mailItems, an add-in opens and closes the mailitems and creates a visual pollution. As far as I found out there is now such method for Outlook. I tried:

newItem.Display(false);

newItem.GetInspector.WindowState = OlWindowState.olMinimized;

These methods don't give a result like a screenUpdating in Excel. Maybe there is any trick to switch off screen updating?


Solution

  • The method Display(false) opens mailitem and then closes it, that's why creates a visual pollution. There is no need to use this method to prevent open the mailitem.