![]() |
|
#5
|
||||
|
||||
|
I take it there is mail in the outbox? It is quite common for messages to stick in the outbox, especially if you view the contents of the Outbox. You can overcome that with a simple Outlook macro attached to a button on the ribbon e.g. as follows to force send the messages.
Code:
Option Explicit
Sub SendAndReceiveAll()
Dim olNS As NameSpace
Dim olSyncs As SyncObjects
Dim olSync As SyncObject
Dim olItems As Items
Dim olItem As MailItem
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 |
Margin settings?
|
Spassapparat | Word | 5 | 06-18-2013 08:02 AM |
| Attaching MSG file is stripped on send and HTML tags show on previewing prior to send | Fantastic4 | Outlook | 0 | 01-09-2012 12:18 PM |
| Dpi settings ... Please help | ragzdaddy | PowerPoint | 4 | 11-24-2011 09:11 AM |
Global Settings
|
lefttoday | Word | 3 | 02-03-2011 03:34 PM |
| Language settings | Gabbyt | PowerPoint | 1 | 12-01-2010 02:30 AM |