Outlook 2003 Event

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.
 
C

ck

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.
 
C

ck

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top