You can get the Windows Login Name using the statement
string currentUser = Environment.Username;
You cannot get the Windows Login Password, not available to any program.
Now I need to do something a bit more difficult, I need to create a new
folder called archive programmatically and move the emails in my inbox
to it in a for loop.
Outlook.MailItem oMsg;
int i;
//Loop through each message
for (i = 1; i < oItems.Count + 1; i++)
{
oMsg = (Outlook.MailItem)oItems.Item(i);
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.