How to programmatically set registry setting to prevent Outlook from removing the VSTO Addin

北战南征 提交于 2020-01-16 09:08:05

问题


Hi is there a way to programatically set the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Resiliency\DoNotDisableAddinList\

with DWORD= 1

As I learned from this posting (among many others) this prevents Outlook from removing my Addin from Outlook for being slow. Yes, it would be better to design the AddIn for being faster. But as it needs to connect service on the internet this will be hard to achieve. BTW: I have this problem also with many other Addins.


回答1:


You need to use .Net base class libraries to get the job done, the RegistryKey class represents a key-level node in the Windows registry. See How to: Create a Key In the Registry (Visual C#) for more information.

Read more about possible windows registry keys and their values in the Add-ins are user re-enabled after being disabled by Office programs article.



来源:https://stackoverflow.com/questions/57835254/how-to-programmatically-set-registry-setting-to-prevent-outlook-from-removing-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!