SasaT

Hi there,

I'm trying to programatically from my add-in attach to BeforeFolderMove Outlook event. I noticed, that when we have a lot of folders (20-30), on some folders this event is not fired during the folder move/delete action. The reason should not be garbage collection, because we do keep in-memory list with all folder objects.


Any idea or suggestion will help.

Thanks,
Sasa



Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

Sue Mosher - Outlook MVP

Can you clarify what you meanby "a lot of folders" Is that a lot of folders subscribed to the BeforeFolderMove event or a lot of folders being moved





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

SasaT

Hi Sue,

thank you for showing interest helping me.

I'm trying to move just one folder! To make a subsciption, I tried two approaches:

1. During the add-in initialization, I subscribed to 20, 30 or more folders. I noticed that the event is fired only for the first 10-15 subscribed folders. Also, for those fired events I get one more problem. If I select folderA and try to move folderB to f.e. folderC using d'n'd, when the event is fired, Application.ActiveExplorer().CurrentFolder is still folderA.

How can I get at this point information that the event is fired on the folderB

2. Second approach was to subscribe to this event inside the Explorer_FolderSwitch event handler. Here I got again problem that the seected folder is not the one I'm moving, because during the d'n'd Outlok does not select moved folder and Explorer_FolderSwitch isn't fired. I didn't find any way to get info about the by d'n'd selected folder.

Hope I clearly described my situation,

Sasa





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

Sue Mosher - Outlook MVP

Are you using a wrapper class That's the best approach to being able to know what object is firing the event.





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

SasaT

Tried also solution with using wrapper class to wrap folder object, but with the same result.

How to get the moving object pointer inside the BeforeFolderMove event handler For sure it is not explorer current folder.





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

Sue Mosher - Outlook MVP

Looks like Microsoft is aware of a problem with BeforeFolderMove not always firing when a large number of folders are subscribed to that event. Chances of getting a fix in SP2 would be improved by any code samples that show a consistently reproduceable scenario.



Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

SasaT

It looked to me as an Oulook bug.

Do you know the way to figure which folder is dragged when this evnt is fired





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

Kelmen

Sue Mosher - Outlook MVP wrote:
Looks like Microsoft is aware of a problem with BeforeFolderMove not always firing when a large number of folders are subscribed to that event. Chances of getting a fix in SP2 would be improved by any code samples that show a consistently reproduceable scenario.

Where can I get Outlook/Office 2007 SP1





Re: Visual Studio Tools for Office Outlook 2007 BeforeFolderMove event

Sue Mosher - Outlook MVP

When SP1 is released, it will be available through the usual channels -- http://office.microsoft.com and Windows Update.