How to run Outlook using Process.Start(“outlook.exe”) and get the control back

前端 未结 5 806
难免孤独
难免孤独 2021-01-26 15:42

My C# program needs to launch Office Outlook and get the current \"running outlook application\". In order to do that I\'ve implemented the following simple program (so if you w

5条回答
  •  离开以前
    2021-01-26 16:15

    There is no need to run the a new process using the Process.Start method. Instead, you can add the Outlook reference to your C# project and create a new instance of the Application class. See C# app automates Outlook (CSAutomateOutlook) sample project for more information.

    Also you may find the following articles helpful:

    • How to automate Outlook and Word by using Visual C# .NET to create a pre-populated e-mail message that can be edited
    • How to use Visual C# to automate a running instance of an Office program

提交回复
热议问题