Rama Krishna rao

Hi,

I need to setup a new Outlook mail account programmatically and add new folders to that account.

I am able to add new folder dynamically but, not able to set up a new mail account dynamically.

Can you suggest any way to setup new mail Account

I am using VSTO and VisualStudio.NET 2005

Any help appriciated...

Thanks in Advance

Rama




Re: Visual Studio Tools for Office How to create new mail account in Outlook2003

Mei Liang - MSFT

Hi Rama -

If you want to create a new outlook mail profile to connect to an existing account in Exchange server, for example, you will need to use MAPI or some tools built using MAPI (http://support.microsoft.com/kb/306962)

If you are talking about creating new mail account on Exchange server, you can use ADSI (Active Directory Service Interface API) together with Exchange server side API.

Hope this helps!

Mei





Re: Visual Studio Tools for Office How to create new mail account in Outlook2003

Rama Krishna rao

Hi Mei,

Thanks for your reply.

My requirement was to create new profile for already existing account . I will try out the options you have suggested and get back to you.

Thanks,

Rama






Re: Visual Studio Tools for Office How to create new mail account in Outlook2003

Sue Mosher - Outlook MVP

You might also want to look at the excellent white paper "Configuring Outlook Profiles by Using a PRF File" at http://office.microsoft.com/search/redir.aspx assetid=HA011403051033&QueryID=pHm7c_60I&respos=3 which explains how Microsoft uses text files with a .prf extension and a highly structured format to provide information to OUtlook that enables Outlook to create or modify a mail profile. You can create such .prf files with the Custom Installation Wizard or Custom Maintenance Wizard tools in the Office Resource Kit.