Hi all,
I am looking to get some help with invoking code in UiPath; Vb.net.
I have written the code in the VS and it works fine:
Module Module1
Sub Main()
Dim File As String
Dim OlApp As Object
OlApp = CreateObject("Outlook.Application")
File = "C:\Users\greavesj\Desktop\Projects\Test\AP Process\Email_Attachment_Temp\Email Attachments\Test - Embedded PDF.msg"
Dim Email = OlApp.CreateItemFromTemplate(File)
For Each Attachment In Email.Attachments
If Attachment.FileName().Contains(".pdf") Then
Attachment.SaveAsFile("C:\Users\greavesj\Desktop\Projects\Test\AP Process\Email_Attachment_Temp\Email Attachments\" & Attachment.FileName())
Else
End If
Next
End Sub
End Module
**Code in UiPath:
Dim File As String
Dim OlApp As Object
OlApp = CreateObject(“Outlook.Application”)
File = "C:\Users\greavesj\Desktop\Projects\Test\AP Process\Email_Attachment_Temp\Email Attachments\Test- Embedded PDF.msg"
Dim Email = OlApp.CreateItemFromTemplate(File)
For Each Attachment In Email.Attachments
If Attachment.FileName().Contains(".pdf") Then
Attachment.SaveAsFile("C:\Users\greavesj\Desktop\Projects\Test\AP Process\Email_Attachment_Temp\Email Attachments\" & Attachment.FileName())
Else
End If
Next
Issues: