Hello Ken
now I have an idea whats changed in the folder and makes the event fi
1. the change event is only firing (if nothing is changed) with contacts in an public! folder on the exchange server
2. it is not firing (if nothing is changed) in an personal folder (also on an exchange server)
3. if one changes the properties settings of the contacts folder on the exchange server from "keep read/unread information per
user for this folder" to not to keep ....(remove checkmark)
the event fires only the first time one contact is opened.
So it seems that a kind of read/unread attribute is toggled and that makes the event fire
Do you have maybe any further idea to prevent the first firing?
Thanks
Michael
"Ken Slovak - [MVP - Outlook]" schrieb im Newsbeitrag ...
Code in ThisOutlookSession also should use the intrinsic Application object and not create an Outlook.Application object.
Something you are running, whether it's the sync code or something else is changing the items or Item.Change wouldn't fire.
If you declare an item object WithEvents you can handle the events for that item. So for a MailItem:
Dim WithEvents oMail as Outlook.MailItem
Then in the NewInspector event handler:
If Inspector.Class = olMail Then
Set oMail = Inspector.CurrentItem
End If
Select oMail in the drop-down at the top left of the code window and in the right-hand drop-down select the PropertyChange
event. You can also select CustomPropertyChange. Write code for those event handlers to see which properties are being changed.
The property name is passed to you as Name in those events.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"MIchael" wrote in message ...
Hello Ken,
Thats not an addin, its only code in thisoutlooksession (DieseOutlookSitzung in German:-)
I changed the program thats shelled for testing to Shell "c:\windows\system32\calc.exe"
the windows calculator. And its just the same .
If I open an contact the event is firing ;-((
But the funny thing is that not every time when I open the contact it is firing it seems to do it randomly.
the first 5 times opening any contact- not firing
2 times opening - firing
2 more times opening an other contact not firing...................
Sorry but I cant do anything with your proposal
"To debug it I'd probably set handlers on the items being changed to handle the PropertyChange event."
I am beginner :-((
Maybe you could give me an other hint what do you mean by "to set handlers"??
Thank you very much for your help!!
Michael