For example, this returns Date, Sender Email address and Subject from the selected item in Outlook.
Code: Select all
olMailItem := 0
MailItem := ComObjActive("Outlook.Application").ActiveExplorer().Selection[1]
ShowDate := MailItem.ReceivedTime
ShowSender := MailItem.SenderEmailAddress
ShowSubject := MailItem.Subject
MsgBox, %ShowDate% | %ShowSender% | %ShowSubject%
There is a MailItem.Forward method for VBA but I can't find how to do it with COMObjects.
Thanks in advance.