小编Pig*_*Pie的帖子

如果Microsoft Outlook已经打开,如何使用C#进行检查?

我试过寻找这个问题的答案......如果我忽略了它,请原谅我.

我想要做的是自动发送电子邮件.我在此代码中拥有我想要的所有内容,但代码假定Outlook未打开.

有没有办法在Outlook打开另一个Outlook实例之前测试Outlook是否已打开?

                Microsoft.Win32.RegistryKey key =
           Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE");
            string path = (string)key.GetValue("Path");
            if (path != null)
                System.Diagnostics.Process.Start("OUTLOOK.EXE");
            else
                MessageBox.Show("There is no Outlook in this computer!", "SystemError", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
Run Code Online (Sandbox Code Playgroud)

c# outlook email-integration

1
推荐指数
3
解决办法
3948
查看次数

标签 统计

c# ×1

email-integration ×1

outlook ×1