Monday 27 May 2013

Qtp Script to download attachments from outlook emails

Qtp Script to download attachments from outlook emails

Set a = CreateObject("Outlook.Application")
Set b = a.GetNameSpace("MAPI")
Set c = b.GetDefaultFolder(6)
For each item in C.Items
if item.unread then
For each att in item.attachments
FileName="C:\Email Attachments\" &att.FileName
att.saveasfile FileName
Next
End if
Next

No comments:

Post a Comment