Using Outlook (COM) with Matlab: how to access an account not set as default

22 views (last 30 days)
Francesco Sgromo
Francesco Sgromo on 4 Mar 2019
Answered: Pierre Harouimi on 24 Oct 2021
i am using the following commands to connect Outlook to Matlab (with the intention to read mails):
outlook = actxserver('Outlook.Application');
Now, instead of using mapi.GetDefaultFolder(6) to get the inbox of the default mail account, i would like to get the inbox of other Outlook accounts.
Thanks in advance for your help

Answers (1)

Pierre Harouimi
Pierre Harouimi on 24 Oct 2021
You can select any of your Outlook accounts with the field mapi.Folders.Item.
You can refer to this github repo with the MATLAB function ReadOutlook2.m

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by