Gunjan1127
Gunjan1127

Reputation: 9

How to get the list of Email id configured in outlook using c#?

I want to get the list of email id configured in outlook along with default email id. I want to set a default id from the multiple email id which are configured in outlook.

Upvotes: 0

Views: 435

Answers (2)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66296

Have you looked into the Namespace.Accounts collection in Outlook? http://msdn.microsoft.com/en-us/library/office/ff867142.aspx

Upvotes: 0

C Sharper
C Sharper

Reputation: 8646

You need to use System.Diagnostics.Process class of c# for this purpose.

You need to create PRF file first.

Then go to commandline option and import the account you want to launch outlook with.

Command For this is as follows:

outlook.exe /importprf C:\Path\FileName1.prf

Upvotes: 1

Related Questions