I am using invoke code to perform few operations on excel in uipath.
When i import “Microsoft.Office.Interop.Excel” Assembly the code did not recognize it.
So, i closed UiPath Studio, opened main xaml in notepad and added the below namespace
xmlns:moie=“clr-namespace:Microsoft.Office.Interop.Excel;assembly=Microsoft.Office.Interop.Excel”
and reopened my main xaml. it worked like a pro.
The problems comes here, When i close UiPath studio and open the same xaml the next day or the same day, the namespace got lost somewhere.
Should i add namespace everytime this way? If so, i cant proceed with this . Please help me in finding a permanent solution.
How to read (.msg) files from folder and save the attachments? I have used the below vbs code to read the mail message from folder and save the attachment.
Dim OlApp
Dim Eml
Set OlApp = CreateObject(“Outlook.Application”)
Set Eml = OlApp.CreateItemFromTemplate(“C:\Users*******.msg”)
Download(Eml)
Sub Download(objEml)
For Each Attch In objEml.Attachments
Attch.SaveAsFile "C:\Users******\readMailMsg" & Attch.FileName
Next
End Sub
It works when i hard code the mailmsg path. But throws permission error like below.