
Programming
E-Mail remains in the outbox
Some times e-mails will not be send and remains in the outbox. One reason could be the virus scanner which occurs some problems or e-mails was draged from the drafts folder to the outbox.
To use this example please read the important notes and have a look to the workshop Use VBA in Outlook®. Please insert this code into a new module (Insert -> Module in the VBA-Editor).
For Outlook® 2000, Outlook® 2002, Outlook® 2003, Outlook® 2007
Option Explicit Public Sub FlushOutBox() '==================================================================================== ' Sends the items in the outbox ' (c) Peter Marchert - http://www.outlook-stuff.com ' 2008-11-02 Version 1.0.0 '==================================================================================== Dim objOutbox As Outlook.MAPIFolder Dim objItem As Outlook.MailItem Dim lngItems As Long On Error Resume Next '------------------------------------------------------------------------------------ ' Reference the outbox '------------------------------------------------------------------------------------ Set objOutbox = Outlook.Session.GetDefaultFolder(olFolderOutbox) '------------------------------------------------------------------------------------ ' Send all items in the outbox '------------------------------------------------------------------------------------ For lngItems = objOutbox.Items.Count To 1 Step -1 Set objItem = objOutbox.Items(lngItems) objItem.Send Next '------------------------------------------------------------------------------------ ' Delete references '------------------------------------------------------------------------------------ Set objOutbox = Nothing Set objItem = Nothing End Sub
On November the 4th 2009 the tool AttachmentsManager was published.
Read more...
Pay once = use forever!
to the Shop...