If you are using C#, the easiest way is to use anonymous delegates:
myFolder.ItemAdd += delegate (object item)
{
// the variable myFolder is available here.
};
The solution in VB is along the same lines, but is a little more complicated - let me know if you need sample code for VB.
------
This post is provided as-is and confers no rights. |