cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to download '.msg' attachments (outlook items) using MAPIEx - Get mail (attachment directory)

AntonyPetson
Level 2
Hi All I was trying to download an Outlook Item (.msg) from one of the emails using MAPIEx - Get mail (attachment directory) but unfortunately, it was unable to save the attachment. However, I am able to download documents (PPT, DOC, etc.,) Could anyone help to save an Outlook Item (.msg) from emails or even saving an email as .msg will also help :) TIA, Antony
8 REPLIES 8

Mustafa_UlasYig
Level 6
Hi Antonypetson You can try the (Uncertified) MS Outlook VBO referenced in this thread: https://portal.blueprism.com/forums/technical-queries/faq-hints-tips/mapiex-save-emails-msg-files . I haven't been able to compile the VBO, as I am running office 2007, I think it requires a newer version of the office package, because I seem to be missing a Microsoft.Office.Interop.Outlook.dll file, which is listed as an external reference under code options for the VBO. But there should be some VBO actions that can do what you are requesting, if you can compile the VBO without errors, that is. Good luck. BR, Mustafa

AntonyPetson
Level 2
Thanks for the info, mustafauy. I will try it out and update the outcome. :) BR.A

Mustafa_UlasYig
Level 6
Hi antonypetson I just tried out the (Uncertified) MS Outlook VBO on my Windows 10 client with Office 2016, and it works. 1) First of all, I changed the path to the Microsoft.Office.Interop.Outlook.dll file in the VBO from: C:\Program Files (x86)\Microsoft Office\root\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin\Microsoft.Office.Interop.Outlook.dll C:\Program Files (x86)\Microsoft Office\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin\Microsoft.Office.Interop.Outlook.dll. This may not be the case for you, try to locate the file and change accordingly in Business Object Properties - Code Options available on initialise page in VBO. 2) You use the MS Outlook VBO (uncertified) VBO's action Get Receieved Items (since date) or any of the other similar get received items actions - to get the items into a collection. 3) You loop this collection of items produced by 2). 4) In this loop you call the MS Outlook VBO (uncertified) VBO's action Save Email As File with input "Entry ID" = [Items.EntryID] and "File Path" = "C:\users\mustafaulasyigit\documents\ & [Items.EntryID] & "".msg"" - or another location to your liking. Good luck. BR Mustafa

AntonyPetson
Level 2
Hi Mustafa Regarding step 1, the dll file was present under the root folder itself so I didn't do any modifications However , I followed your valuable instruction but unfortunately, getting the below error when I try to save the file (.msg). Internal : Could not execute code stage because exception thrown by code stage: Value does not fall within the expected range. Kindly, help me to fix this issue. BR, Antony.

AntonyPetson
Level 2
Hey! Sorry, it's working :) I was getting error when I was trying partially with MapIEx and then with uncertified version.  Thanks for the detailed comments on how to achieve it. BR, Antony.

Mustafa_UlasYig
Level 6
Hi anthonypetson Just to make sure, you have chosen the MS Outlook VBO (uncertified) VBO's action ""Save Email As File"" and not one of the other actions, right? Which Windows and Microsoft Office versions do you have? Are you getting this error, in step 2, 3 or 4? Please see enclosed file to see screenshots of process layer. BR, Mustafa

Mustafa_UlasYig
Level 6
See enclosed file, apparently no zip files allowed... BR, Mustafa

Thank you,
        for sharing such good information, for lots of love, and amazing things that you have contributed.



------------------------------
Jeevika khan
------------------------------