Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-16-2015, 03:25 AM
gmayor's Avatar
gmayor gmayor is offline Cant get send settings that I want Windows 7 64bit Cant get send settings that I want Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant get send settings that I want 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
Cant get send settings that I want Global Settings lefttoday Word 3 02-03-2011 03:34 PM
Language settings Gabbyt PowerPoint 1 12-01-2010 02:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft