Please do not start new threads for the same problem. It just confuses
things.
If items in the Outbox are messed with using code then they won't go out.
That is true of all Outlook versions. So the simple answer is don't do that.
There's no need to do it, so don't.
If the ActiveExplorer.CurrentFolder is Outbox just don't handle
SelectionChange() there. If it's not Outbox you can safely handle
SelectionChange(). Since BeforeFolderSwitch() will fire before the folder in
the Explorer is switched to Outbox you will know when that happens. So just
remove the SelectionChange() handler then and reinstate it when the folder
isn't Outbox.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Jason" wrote in message
...
Now the problem of email won't go out also occurs on Outlook 2003. So it
is not 2007 specific.
After comment out the explorer.SelectionChange, emailing resumes normal.
explorer.SelectionChange +=
new
Outlook.ExplorerEvents_10_SelectionChangeEventHand le(ThisAddIn_SelectionChanged);
The reason of using explorer.SelectionChange is to catch EntryIDs of the
appointments to be deleted.
The Email problem has been fixed in Outlook 2007 by replacing
SelectionChange with BeforeItemMove event.
What is the feasible solution for 2003?
I'll start a new thread.
"Jason" wrote in message
...
Yes you are right. The problem only occurs when user clicks the Outbox
folder then create a new mail. No problem if user has not highlighted the
Outbox.
Once the mail is stalled, no matter how many times you click Send and
Receive button, it will stay there forever, even after user move to
other folder or restart Outlook. You have to delete it, and create an new
mail.
What can I do then? Tell user not to select Outbox, or unselect the
Outbox programmatically if user does that?