Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote following code for get pst information but i didn't give any out put also it dosen't have errors
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OutLook = Microsoft.Office.Interop.Outlook;
namespace reading_past_file
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnCheck_Click(object sender, EventArgs e)
{
OutLook._Application OutlookObj = new OutLook.Application();
OutLook.MAPIFolder fldMail = (OutLook.MAPIFolder)OutlookObj.Session.GetDefaultFolder(OutLook.OlDefaultFolders.olFolderInbox);
OutLook.MailItem newMail = (OutLook.MailItem)fldMail.Items.Add(OutLook.OlItemType.olMailItem);

}
}
}


let me tell u what i want to do
I need to do I need to read Unread emils in MAPI folder and get SenderName SenderAddress Body and Attachment content for my development I don't really have good idea about Introp classes
Posted
Updated 3-May-10 8:09am
v2

Have a look at this article:
Import and Export Outlook Appointments (using JavaScript)[^]

This is done for webapplication. You will get an idea of what needs to be done. You need to write similar code in code-behind for desktop application.
 
Share this answer
 
Based on your last question[^], you want to read it and not write!


Kasunmit wrote:
newContact.Email1Address= textBox1.Text.Trim().ToString();

Current code will create a contact and thats it.
Were you trying to do something else?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900