Hi @Irina_Butu ,
You can try by activity
1.Read the mail usng get mail activity as per your requirement
->output will be of type mail message
2.Use for each loop of the mail message, check with if condition if there are any attachments,
3.Then, if you have any attachments then save them usng save attachments, the output of save attachment will have IEnumberable attachments, so this will have the path along with name of the file and type of the file, again use if statement to check if the IEnumerable attachments ends with .msg format or not,
Code:
vb
VB Code to save attachments from .msg file
outlookApp As New Microsoft.Office.Interop.Outlook.Application
mailItem As Microsoft.Office.Interop.Outlook.MailItem = outlookApp.Session.OpenSharedItem(msgFilePath)
For Each attachment In mailItem.Attachments
attachment.SaveAsFile(Path.Combine(outputFolderPath, attachment.FileName))
Next