PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
This seems impossible: MessageClass is changing on me.
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
This seems impossible: MessageClass is changing on me.
![]() |
This seems impossible: MessageClass is changing on me. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi All,
Environment: VB6 SP5, Outlook 2000 SP3, Windows 2000 SP4 I'm listening for items being added to the Deleted Items folder, along the lines of: http://groups.google.com/groups?hl=...3D100%26hl%3Den Here is the relevant code: Private Sub m_olDeletedItems_ItemAdd(ByVal Item As Object) If m_bDeleteDetected And Item.MessageClass = "IPM.Appointment.SW" Then ' Do my special thing with this custom form MsgBox "Taking the If clause" m_bDeleteDetected = False Else Debug.Print Item.MessageClass, m_bDeleteDetected Stop End If End Sub The behavior I see is that if I'm deleting an appointment of this custom message class (I verified the IPM.Appointment.SW message class using OutlookSpy), often my code will not take the If clause, but the Else clause, and it will debug.print: IPM.Note True If then in the Immediate window I enter: ?Item.MessageClass, m_bDeleteDetected I will get: IPM.Appointment.SW True That doesn't make sense to me. It seems that the messageclass is not constant. Who can clarify it for me? Thanks, -Tom. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
I found out how to fix this. Rather than using:
Item.MessageClass use: Item.FormDescription.MessageClass -Tom. <clip> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

