BeforeFolderMove

N

Nabil

Hi,

Adding the above handler to any folder in a PST file works for some time
before I stops firing.

STEPS TO REPRODUCE (Using VB.NET or C#)

Try creating a a folder structure in a PST file
Add BeforeFolderMove event to each of the above folders
Make sure you keep a reference to the above folders to avoid the GC collection

The BeforeFolderMove even will fire for about 20 minutes or so and then it
will stop firing.

Could this please be fixed?

Thanks

Nabil

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...91c69&dg=microsoft.public.outlook.program_vba
 
K

Ken Slovak - [MVP - Outlook]

Steps to reproduce? What code are you using? FWIW, I haven't seen that sort
of thing unless the events go out of scope or get garbage collected, or are
released somehow somewhere in the code.
 
N

Nabil

Hi and thanks for your reply

I'm coding in VB.NET and using VSTO.

The code references never go out of scope. It's almost like some references
go out of scope inside of Outlook. As you may already be aware,
BeforeFolderMove is a newly added event handler in Outlook 2007 and I believe
it has bugs.

Read this page, Sue Mosher (Outlook MVP) suggests that Microsoft are aware
of a problem with it.

http://windows-tech.info/16/0489b30f5a7eac94.php

Thanks
 
K

Ken Slovak - [MVP - Outlook]

That thread refers to a problem when a lot of folders are subscribed to the
event, is that the case for you? The initial post led me to believe that
this happened when you subscribed to the event for only one folder.

If you have the indicated problem there's nothing you can do about it until
SP2 comes out and then you can see if it fixes the problem.
 
N

Nabil

Thanks Ken,

I am creating a folder structue and all the folders subscribe to that event.
I hope this does get sorted in SP2 as my project relies on this.

Do you know when it's coming out for certain than or are we just saying
before the 1st of April?

Do you know of anyway around the above problem? Besides FolderChange,
FolderAdd and FolderRemove as these run asynchronously and there's no way to
predict the order that they will fire? I need to basically not allow folders
to be moved within my folder structre i.e. when a folder is moved by the
user, I need to move it back?

Your help is greatly appreciated.

Thanks once again

Nabil
 
K

Ken Slovak - [MVP - Outlook]

I don't know of any workarounds, and I have no idea when SP will be
released.

You can download the new Outlook pre-SP2 cumulative updates that were
recently released, those should have much of what you can expect for the
Outlook changes for SP2 as far as I know, see
http://support.microsoft.com/kb/968009.

But SP2 might not fix the problem. Some MAPI events just don't fire if too
many changes are involved, for example ItemAdd/ItemChange/ItemRemove won't
fire if 16 or more items are affected at once. That's not caused by an
Outlook limit, it's an underlying MAPI limit where in those cases only a
folder_change event is fired.
 
N

Nabil

Thanks for your efforts Christian.

I also installed KB961752 and it seemed to make it even worse.

I'd also be cerefull with KB961752 as I found at least one bug with it which
is

Application.ActiveExplorer.Selection.Count will return 0 when you select
multiple items. So watch out!

Thanks
 
K

Ken Slovak - [MVP - Outlook]

What number of items? I have that hotfix installed on a machine here and
selecting 8 items returns a count of 8. Selecting 225 items returns 225, so
on a couple of tests I can't repro your claim.
 
K

Ken Slovak - [MVP - Outlook]

Did you ever hear back from that MS support engineer about a bug on this?
What is the support incident number? You can send it to me offlist at my
email address, it's better not exposed to the Internet.

I asked the owner of the Outlook object model in the Outlook Product Group
and they don't have a bug logged on this problem. He asked me to get some
additional information, also if you have a support case number that would be
really helpful. Any repro information also would be excellent.

Specifically, what type of store provider: Exchange mailbox, Exchange public
folders, PST files, custom store, etc.?

How many folders are subscribed to that event? What type of folders?
 
N

Nabil

Hi and sorry for the delay.

This definately reported 0 items for me. I'm using a PST File with lots of
mail folders.
 
N

Nabil

Thanks Christian for replying.

As far as I'm concerned, my initial post gives you all the information I
have. I created a PST file, created multiple folders as follows, not more
than 15 folders, each folder had 1 or 2 documents (word documents that were
posted to the folder programatically)

A Test 1
A Test 1.1
A Test 1.1.1
A Test 1.2
A Test 1.3
A Test 2
A Test 2.1
A Test 2.2
A Test 3
A Test 3.1
A Test 3.1.1
A Test 3.1.2
A Test 4
A Test 5

BeforeFolderMoves works for a while then stops working altogether. I'm
sorry I don't have any more info, if you have any questions then I've got
notify on this time so just reply to this!

Thanks in advance

Nabil
 
K

Ken Slovak - [MVP - Outlook]

According to the Outlook team this is definitely a bug. There's no timeline
at this point for when or if a hotfix will be released, and no information
as to whether a possible fix will be in Office 2007 SP2, although I doubt it
will be.
 

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