Auto-login

C

Chris

I have the following code in c#:

app = new Outlook.ApplicationClass();
ns = app.GetNamespace("MAPI");
MessageBox.Show("Going for the auto-login!");
ns.Logon("someProfile", "somePassword", false, true);
MessageBox.Show("I tried my best!");

Everything works fine if I'm already logged into outlook but this is
something I want done even if I'm not, hence the "ns.Logon"-line. The
problem is that I still get prompted for a password (the profile is
correct) and this happens between the two debugging messageboxes I've put
in.

Any suggestions on what's wrong?

Regards
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top