I'm trying to get mailitem by Outlook.application
object, and reply email by certain subject naming rule.
Now I'm able to get the mailitem, filter the mail by its subject. How can I move the next step to reply
email? Thanks
Belo is my code so far:
Set objOutlook = CreateObject("Outlook.Application")
Set MailItem = objOutlook.Session.Folders("XXX@XXX.com")
For Each eMail in MailItem.Items
If InStr(1,Trim(eMail.Subject),"Production",vbTextCompare) > 0 then
wscript.echo "This is needed email, need to reply"
End If
Next