Hi, Im trying to read .msg files invoking VB code and have some trouble getting it to compile. Id appreciate some feedback on my code
Thank you for your help

EmailFilename is the filepath of the email given as an argument
Hi, Im trying to read .msg files invoking VB code and have some trouble getting it to compile. Id appreciate some feedback on my code
Thank you for your help

EmailFilename is the filepath of the email given as an argument
Try using Imports Microsoft.Office.Interop.Outlook instead of what you’re using while importing
Also can you share your fulll code?
Import the ‘Microsoft.Office.Interop.Outlook’ namespace using the Data Manager to resolve the compile-time error.
Hey @idoia.fernandez,
Imports statements are not allowed inside Invoke Code, so remove that and add the Outlook namespace in Imports panel of UiPath. Create Outlook Application object before calling methods: Dim outlookApp As New Microsoft.Office.Interop.Outlook.Application. Then use Dim email = outlookApp.Session.OpenSharedItem(msgFilePath) to read the .msg file.
Can you please create a separate topic dor this we will try to help you. Thank you
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.