I've written an outlook 2003 add in that connects to some software via an imap service. My aim is to create an imap account at runtime so that it can connect to the imap service without restarting outlook. I currently do this by displaying a dialog requesting minimal connection details, creating a .prf file on the fly and then setting a registry key to import the prf file when outlook restarts. This has two drawbacks: 1) Outlook is required to be restarted 2) even though I've requested the password from the user they are still required to type it in again when outlook connects to the new imap account for the first time The following post went some of the way to doing this programmatically but I'm not sure how far they got... http://www.ureader.com/message/161994.aspx I also downloaded the profman2 sample on the microsoft site as a guide. It was a bit scary the number of times that the word HACK appeared in the source! http://support.microsoft.com/kb/228736/ After a week of searching I'm almost happy to use win32 events to drive the outlook account creation wizard - if only I knew how to do it without displaying the UI to the user... Does anyone have any suggestions, code samples on how I could achieve this? regards, adam.
AS of Outlook 2003, IMAP4 and POP3/SMTP services are no longer MAPI based. You can use IOlkAccoutnManager to access existing services, but MS has never documented the pieces required to add new services using IOlkAccoutnManager Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Adam" wrote in message news:3C55026B-EDF2-4A65-815D-86A505A0E58A@microsoft.com... > I've written an outlook 2003 add in that connects to some software via an > imap service. My aim is to create an imap account at runtime so that it > can > connect to the imap service without restarting outlook. > > I currently do this by displaying a dialog requesting minimal connection > details, creating a .prf file on the fly and then setting a registry key > to > import the prf file when outlook restarts. > > This has two drawbacks: > 1) Outlook is required to be restarted > 2) even though I've requested the password from the user they are still > required to type it in again when outlook connects to the new imap account > for the first time > > The following post went some of the way to doing this programmatically but > I'm not sure how far they got... > http://www.ureader.com/message/161994.aspx > > I also downloaded the profman2 sample on the microsoft site as a guide. It > was a bit scary the number of times that the word HACK appeared in the > source! > http://support.microsoft.com/kb/228736/ > > After a week of searching I'm almost happy to use win32 events to drive > the > outlook account creation wizard - if only I knew how to do it without > displaying the UI to the user... > > Does anyone have any suggestions, code samples on how I could achieve > this? > > regards, > > adam.