Read a .msg file and save attachement

This simple vbs should work fine, you could even pass the arguments in the Start Process activity.

Dim OlApp
Dim Eml
Dim Arg
Set Arg = WScript.Arguments
Dim File

File = Arg(0)

Set OlApp = CreateObject(“Outlook.Application”)
Set Eml = OlApp.CreateItemFromTemplate(File)
Download(Eml)

Sub Download(objEml)
For Each Attch In objEml.Attachments
Attch.SaveAsFile "C:\temp\" & Attch.FileName
Next
End Sub

11 Likes