How to programmatically access old archived mails in Outlook in plug-in

Devendra Tewari 1 Reputation point
2021-02-16T13:46:08.51+00:00

Hi All,

I have developed VSTO plug-in for outlook in C#. My outlook is configured for OST to show 30 days old mails. However when I click on “Click here to view more on Microsoft Exchange”, it shows all old mails. But even then, when I try to access using OOM model, it returns only mails present in OST, not other mails (although those mails are visible in outlook view).

I am using following code to get mail :--

MAPIFolder currentFolder = GetCurrentFolder();
Items col = currentFolder.Items;
int count = col.Count;

It is returning same count even if I already loaded older mails by click on “Click here to view more on Microsoft Exchange”. Can somebody suggest solution of it ?

Thanks
Devendra

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,687 questions
{count} votes