Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 8:03
mvePIEBALDconsult11-Mar-10 8:03 
GeneralRe: Switch versus an array of delegates Pin
Dave Kreskowiak11-Mar-10 9:11
mveDave Kreskowiak11-Mar-10 9:11 
GeneralRe: Switch versus an array of delegates Pin
dybs11-Mar-10 17:28
dybs11-Mar-10 17:28 
GeneralRe: Switch versus an array of delegates Pin
Luc Pattyn11-Mar-10 17:38
sitebuilderLuc Pattyn11-Mar-10 17:38 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 6:41
mvePIEBALDconsult11-Mar-10 6:41 
QuestionCreating system of separation access rights Pin
Xgener11-Mar-10 5:26
Xgener11-Mar-10 5:26 
AnswerRe: Creating system of separation access rights Pin
Saksida Bojan11-Mar-10 5:56
Saksida Bojan11-Mar-10 5:56 
QuestionOutlook - with Hotmail account Pin
chiky_ancutza11-Mar-10 5:21
chiky_ancutza11-Mar-10 5:21 
Hi,

1. I configured the Outlook to work with Windows Live Hotmail(my hotmail account)
2. Now i want to read all the inbox from my hotmail account using C#.
3. The outlook create for hotmail a file with .ost extension(not with .pst)
4. My procedure is like this:
TextWriter tw = new StreamWriter(@"C:\pstfile_html.txt");
// Create the Outlook application.
// in-line initialization
Outlook.Application oApp = new Outlook.Application();

// Get the MAPI namespace.
Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");

// Log on by using the default profile or existing session (no dialog box).
oNS.Logon(Missing.Value,Missing.Value,false,true);

//Get the Inbox folder.
Outlook.MAPIFolder oInbox = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);

//Get the Items collection in the Inbox folder.
Outlook.Items oItems = oInbox.Items;

Outlook.MailItem oMsg = (Outlook.MailItem)oItems.GetFirst();

for (int i = 0; i < oItems.Count; i++)
{

//Output some common properties.
tw.WriteLine(oMsg.Subject);
tw.WriteLine(oMsg.SenderName);
tw.WriteLine(oMsg.ReceivedTime);
tw.WriteLine(oMsg.Body);
tw.WriteLine(oMsg.HTMLBody);
tw.WriteLine("Next Message-----------------------");
oMsg = (Outlook.MailItem)oItems.GetNext();

//System.Diagnostics.Debug.WriteLine(objMail.Body.ToString());

}


//Log off.
oNS.Logoff();

//Explicitly release objects.
oMsg = null;
oItems = null;
oInbox = null;
oNS = null;
oApp = null;
tw.Close();
}

//Error handler.
catch (Exception e)
{
Console.WriteLine("{0} Exception caught: ", e);
}

// Return value.
return 0;

}
6. I don't know how to take hotmail folder.

Thanks,
Anca
QuestionGameServer Query A2S_PLAYER Problem Pin
Nokia555611-Mar-10 5:21
Nokia555611-Mar-10 5:21 
QuestionRotate an rectangle while moving the mouse... and watch it rotating Pin
nwl11-Mar-10 3:01
nwl11-Mar-10 3:01 
AnswerRe: Rotate an rectangle while moving the mouse... and watch it rotating Pin
OriginalGriff11-Mar-10 3:52
mveOriginalGriff11-Mar-10 3:52 
AnswerRe: Rotate an rectangle while moving the mouse... and watch it rotating Pin
dan!sh 11-Mar-10 4:28
professional dan!sh 11-Mar-10 4:28 
AnswerRe: Rotate an rectangle while moving the mouse... and watch it rotating Pin
Luc Pattyn11-Mar-10 5:18
sitebuilderLuc Pattyn11-Mar-10 5:18 
Questionhi Pin
Djtech0111-Mar-10 2:49
Djtech0111-Mar-10 2:49 
AnswerRe: hi Pin
Not Active11-Mar-10 3:28
mentorNot Active11-Mar-10 3:28 
AnswerRe: hi Pin
Luc Pattyn11-Mar-10 3:50
sitebuilderLuc Pattyn11-Mar-10 3:50 
Generaldetail explaination to my question. Pin
Djtech0114-Mar-10 22:18
Djtech0114-Mar-10 22:18 
AnswerRe: hi Pin
Dave Kreskowiak11-Mar-10 5:19
mveDave Kreskowiak11-Mar-10 5:19 
Questionconvert foxpro project to c#/ms sql2005 server project Pin
bharatvpatil11-Mar-10 1:52
bharatvpatil11-Mar-10 1:52 
AnswerRe: convert foxpro project to c#/ms sql2005 server project Pin
Dave Kreskowiak11-Mar-10 1:59
mveDave Kreskowiak11-Mar-10 1:59 
AnswerRe: convert foxpro project to c#/ms sql2005 server project Pin
dan!sh 11-Mar-10 4:30
professional dan!sh 11-Mar-10 4:30 
Questionget the stream writer of the webbrowser control Pin
Yustme11-Mar-10 1:38
Yustme11-Mar-10 1:38 
AnswerRe: get the stream writer of the webbrowser control Pin
Kristian Sixhøj11-Mar-10 1:47
Kristian Sixhøj11-Mar-10 1:47 
GeneralRe: get the stream writer of the webbrowser control Pin
Yustme11-Mar-10 1:48
Yustme11-Mar-10 1:48 
GeneralRe: get the stream writer of the webbrowser control Pin
Kristian Sixhøj11-Mar-10 1:51
Kristian Sixhøj11-Mar-10 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.