Dave Sampieri
Posts: 1
Joined: 2006-01-03
|
I am attempting to trap the ReplyAll event from a mailitem. Your code does not expose that event, so I was trying this:
Private Sub MyActionOnSelectionChange(ByVal item As Object)
Try
Dim EntryID As String = Convert.ToString(item.GetType().InvokeMember("EntryID", BindingFlags.GetProperty, Nothing, item, Nothing))
If LastEntryID <> EntryID Then
Dim Subject As String = Convert.ToString(item.GetType().InvokeMember("Subject", BindingFlags.GetProperty, Nothing, item, Nothing))
m_objMail = item
messagebox.show(m_objMail.Subject)
LastEntryID = EntryID
End If
Catch ex As System.Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Setting the reference to m_objMail works fine and so does showing the subject this way. However, when I add this:
Private Sub m_objMail_ReplyAll(ByVal Response As Object, ByRef Cancel As Boolean) Handles m_objMail.ReplyAll
MessageBox.Show("ReplyAll was hit")
End Sub
I receive an error that no such interface is supported.
Any thoughts/help appreciated. |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
|