Outlook 2003 Event

  • Thread starter Thread starter ck
  • Start date Start date
C

ck

Hi all,

I am trying to get contact item information when user moves the particular
contact item to another folder. I have checked in MSDN library for the list
of event in Outlook 2003. The closest i can get is the ItemRemove event.

Public WithEvents myOlItems As Outlook.Items

Private Sub myOlItems_ItemRemove()
'Do something here
End Sub

The problem is that ItemRemove event does not have any parameter. Do you
know any event that work like ItemRemove event and have Item as parameter.

Thanks.
 
Michael,

Thanks for the reply. I have looked at the SelectionChange event. I can get
the selected folder but not the selected item when i select one of the
contact item. Am I getting this correct? Do you have any example on how it is
done? I am kind of lost here.
 
Thanks Michael!

Well, i managed to get the contact item by using this piece of code:

Private Sub myOlExp_SelectionChange()
Dim myOlItems As Outlook.Items
Dim myOlContactItem As Outlook.contactItem
Dim objSelected As Object

If myOlExp.Selection.Count > 0 Then
Set objSelected = Me.myOlExp.Selection.Item(1)
If (TypeOf objSelected Is Outlook.contactItem) Then
Dim contactItem As Outlook.contactItem
Set contactItem = objSelected
End If
End Sub
 
Back
Top