Getting Sender Email from a "Just Arrived" Email

Add-in Express™ Support Service
That's what is more important than anything else

Getting Sender Email from a "Just Arrived" Email
 
Richard Stevens




Posts: 63
Joined: 2007-01-24
I have an embedded form inside an email message window which shows additional information (extracted from the corporate database) about the sender based on their email address. (using D7 and the version of Addin Express before 2007).

I currently use this code to get the email address:

if Self.OutlookAppObj.ActiveExplorer.Selection.Count > 0 then
lSelectedItem := Self.OutlookAppObj.ActiveExplorer.Selection.Item(1);
Result := lSelectedItem.SenderEmailAddress;

which works fine if you first select an email from your inbox and double-click to open it.

But when a new email arrives, Outlook gives you that hint in the bottom right with the sender's name, subject line and a preview of the text. If you click on that hint to open the message, the above code doesn't work because the email in question is not actually selected in the Inbox.

Sorry if this has been asked before, but I couldn't find an answer by searching the forums, mainly because I wasn't sure what the correct term for that "Email hint" is.

Thank you,
Richard

Posted 24 Jan, 2007 05:24:23 Top
Fedor Shihantsov


Guest


Hi Richard,

Try to use Self.InspectorObj.CurrentItem.

P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 24 Jan, 2007 05:53:21 Top