vijayakrishnabv
2 years agoOccasional Contributor
Unable to capture outlook email content from outlook 365
Hi Friends,
Below code is working fine with Outlook 15, to capture email content of specific email. It stopped working when we migrate to outlook 365.
"Body" method of the code is not working (Showing as "operation aborted" in watch list for Body property), Any idea on how to resolve this issue?
var outlookApplication = Sys.OleObject("Outlook.Application");
var NamespaceMAPI = outlookApplication.GetNamespace("MAPI");
var inbox = NamespaceMAPI.GetDefaultFolder(Folders[folderID]); //Passing folder ID numbers
items = inbox.Items;
oBody = items.Item(i).Body;