以编程方式禁用outlook 2003 toast通知?

时间:2012-06-11 13:37:29

标签: c# outlook outlook-2003

Hopefullay一个简单的答案,但是可以通过编程方式禁用outlook 2003 toast弹出通知吗?

注意:我正在使用c#。

2 个答案:

答案 0 :(得分:1)

HKEY_CURRENT_USER\Software\Microsoft\Office\<version number here>\Outlook\Preferences\NewmailDesktopAlerts

将其更改为零。

答案 1 :(得分:0)

感谢Frank White给我最初的线索:)

这是我问题的完整答案。

using Microsoft.Win32;

//this will create the subkey or if it already exists will just get the location. there is //no getsubkey in the registryclass

RegistryKey rkRegOutlookPreferences = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Office\11.0\Outlook\Preferences");

//this will add in or change a value in that subkey

rkRegOutlookPreferences.SetValue("NewmailDesktopAlerts", "0", RegistryValueKind.DWord);

//there is also getValue; this will return a null if the value doesnt exist

rkRegOutlookPreferences.GetValue("NewmailDesktopAlerts")

//and deleting 

rkRegOutlookPreferences.DeleteValue("NewmailDesktopAlerts");

还有更多,但这完成了我的问题的完整答案。再次感谢弗兰克怀特给我的第一步。