1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| Application app = new Application();
// Définie une Arborescence pour les tests
MAPIFolder folder = app.Session.Folders["NomDeLaBoiteDeTest"];
folder = folder.Folders["Inbox"];
Table table = folder.GetTable("", OlTableContents.olUserItems);
// Suppression des colonnes par défaut
table.Columns.RemoveAll();
// Ajout des colonnes concernées
table.Columns.Add("EntryID");
table.Columns.Add("SenderName");
table.Columns.Add("ReceivedTime");
table.Columns.Add("LastModificationTime");
table.Columns.Add("Subject");
table.Columns.Add("Unread");
table.Columns.Add("Sensitivity");
table.Columns.Add("FlagRequest");
table.Columns.Add("SentOn");
table.Sort("LastModificationTime", OlSortOrder.olDescending);
while (!table.EndOfTable)
{
Row nextRow = table.GetNextRow();
// ...
} |
Partager