Retrieve a shared inbox in Outlook
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello! First time Outlook COM user. I have code to load the default outlook inbox in MATLAB, but I would like to download email from a shared outlook inbox. Here is the code to view email from the default inbox:
outlook = actxserver('Outlook.Application');
mapi = outlook.GetNamespace('mapi');
INBOX = mapi.GetDefaultFolder(6); % inbox items, I think this is the line I need to change?
email = INBOX.Items.Item(1);
inbox.Subject{i} = email.get('Subject');
I also have a way to view the shared inbox content using windows PowerShell:
Add-Type -assembly "Microsoft.Office.Interop.Outlook"
$Outlook = New-Object -comobject Outlook.Application
$namespace = $Outlook.GetNameSpace("MAPI")
$namespace.Folders(1).Folders.Item('Inbox').Folders.Item('Elwha').Items
But when I try 'INBOX = mapi.Folders(1).Folders.Item('Inbox').Folders.Item('Elwha').Items' in MATLAB, I get the error message 'Undefined function or variable 'Folders''
0 comentarios
Respuestas (1)
Ver también
Categorías
Más información sobre Standard File Formats en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!