vsto - Outlook 2007 add-in - Problem using BeforeItemMove event -


I am writing an Outlook 2007 addin, what I am doing is:

  Private Zero This AdDun® startup (Object Sender, System.EventArgs e) {Outlook.Folder Route; // creates spam folder if it does not exist (SpamFolderExist ()) {CreateSpamFolder (); } Root = (Outlook.Folder) this.Application.Session.DefaultStore.GetRootFolder (); // Before the item item spam and Inbox folder go ahead for spamFolder = (Outlook.folder) Root. Folders ["spam"]; InboxFolder = (Outlook.Folder) this.Application.ActiveExplorer (). Session GetDefaultFolder (Outlook.OlDefaultFolders.olFolderInbox); SpamFolder. First ItemMov + = New Microsoft.Office.Interop.Outlook.MAPIFolderEvents_12_BeforeItemMoveEventHandler (BeforeItemMoveFromSpam); Inbox folder Firsttime + new = Microsoft.Office.Interop.Outlook.MAPIFolderEvents_12_BeforeItemMoveEventHandler (BeforeItemMoveFromInbox); // Set this new mail event. Application NewMail + = New Microsoft.Office.Interop.Outlook.ApplicationEvents_11_NewMailEventHandler (OnNewMail); }  

And the problem is that, even though I am not writing anything in ITememoveFromInbox and BeforeItemMoveFromSpam methods before, there is a strange behavior in the application. After some fairs move forward , It does not take any further action for any particular mail. It seems that a mail is blocked and I can not move it after performing other moving actions, other mails have been blocked and can be transferred which was previously blocked. The idea is that after the mail has been blocked, it will always be at least one match that can not be transferred. In other words some of the randomly moving actions fail. I have to say that I am doing nothing but sending mail from one folder to another and I do not get any error message. I already tried to set up the parameters to cancel the event handle, but at the end of the methods I found only that behavior

You got this 76 miles I had the same problem (previously only a folder from the Itammov event , So when I took a message out of that folder, I could not move it from another folder to another folder for a while).

Marshall at the end of the event handler. By adding the release com object () it was completely rectified.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -