read event not triggered

W

Willem Peper

Hi,
I have some code that adds an extra menu in the menubar, when a contact is
opened.

Public WithEvents myOlInspectors As Outlook.Inspectors
Public WithEvents myContact As Outlook.ContactItem

Public Sub myOlInspectors_NewInspector(ByVal Inspector As Outlook.Inspector)
If Inspector.CurrentItem.Class = olContact Then
Set myContact = Inspector.CurrentItem
End If
End Sub

Private Sub myContact_Read()
addContactMenu 'this is code in a module
End Sub


Sometimes it works fine and sometime it doesn't.
Closing Outlook and restarting it does not help.
Booting Window XP again does help.

addContactmenu works all the time when called manually.

Can somebody give me the reason for this strange behavior?
Thanks
Willem

XP Home, Outlook 2002, Office 2000
 
M

Michael Bauer

Am Mon, 12 Jun 2006 12:06:58 +0200 schrieb Willem Peper:

Probably the item is read already if NewInspector fires. Why do you need the
Read event after NewInspector, or why don´t you call addContactMenu from
within NewInspector?
 

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