![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
It is certainly not an unknown problem, but it should not be insurmountable. The following macro added to a ribbon button can be used to force the messages in the Outbox to be sent:
Code:
Option Explicit
Sub SendAndReceiveAll()
Dim olNS As NameSpace
Dim olSyncs As SyncObjects
Dim olSync As SyncObject
Dim olItems As Items
Dim olItem As Object
Dim i As Long
Set olNS = Application.GetNamespace("MAPI")
Set olSyncs = olNS.SyncObjects
Set olItems = olNS.GetDefaultFolder(4).Items
For i = olItems.Count To 1 Step -1
Set olItem = olItems(i)
olItem.sEnd
DoEvents
Next i
For i = 1 To olSyncs.Count
Set olSync = olSyncs.Item(i)
olSync.Start
DoEvents
Next
CleanUp:
Set olItems = Nothing
Set olItem = Nothing
Set olNS = Nothing
Set olSyncs = Nothing
Set olSync = Nothing
lbl_Exit:
Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook 2010 setting to download pictures won't stay | kenmanblue | Outlook | 0 | 01-02-2016 08:57 PM |
Cannot move messages with PST Outlook 2010
|
Badgeros | Outlook | 2 | 07-14-2011 05:51 PM |
Outlook 2010 will not send some messages
|
Lundrat | Outlook | 2 | 01-27-2011 01:36 PM |
| messages stuck in Outbox | Enduroman | Outlook | 7 | 11-13-2010 12:04 PM |
outgoing messages going to outbox and not sending
|
markmerid | Outlook | 1 | 01-17-2007 02:43 PM |