0

I'd like to have Outlook check my email less often. I know about Send/Receive Groups, but as I understand it, if it's checking email through Exchange, that setting doesn't matter and email checking is instantaneous. To avoid workflow disruption, I'd like it to only show me new emails every 30 or 60 or whatever minutes. Is there a way to do that from the user's end (I am not an admin)? I can do it manually by clicking "work offline," but I'd like to have Outlook do this for me.

thanks, Ben

  • The proposed duplicate question has no correct answers for users wishing to configure send/receive options for Exchange-based accounts. – I say Reinstate Monica Jan 12 '15 at 19:04
0

When using an Exchange account, Outlook does not periodically poll the server for new messages as is necessary with POP3 or IMAP accounts. Instead, the Exchange Server uses push notifications to inform the Outlook client when new messages have arrived.

For this reason, the only control you have over how often Outlook checks for mail from an Exchange account is the Work Offline button. All of the other Send and Receive options in the Outlook application have no effect with an Exchange account. Unfortunately Outlook doesn't have any options in the UI for specifying to go offline and online according to a schedule.

Your options/workarounds for controlling Send/Receive behavior in Outlook with an Exchange account are:

  1. Manually invoke the Work Offline button when you want to check for new mail. Keep in mind that while you're offline messages you send will not be sent until you go back online.
  2. Create the illusion Outlook has not received any mail until you're ready to look at it:

    A. Turn off all New Message notifications in Outlook Options

    B. Create a custom view for your Inbox folder that hides new messages received today. Use it when you don't want to know about new email you've recently received.

Option 2 has its flaws. By far the best work around I've found is to manually employ the Work Offline button.

-1

The only solution I can think of involves running some VBA that triggers the "Send/Receive" functionality every x minutes.

Based on this answer from Stack Overflow, this answer on MSDN and a few very minor tweaks I think this solution should work.

Place the following code in the ThisOutlookSession module (Tools -> Macros -> VB Editor):

Private Sub Application_Quit()
    If TimerID <> 0 Then Call DeactivateTimer 'Turn off timer upon quitting **VERY IMPORTANT**
End Sub

Private Sub Application_Startup()
    Call ActivateTimer(30) 'Set timer to go off every 30 minutes
End Sub

And the following code in a new VBA module:

Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerfunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long

Public TimerID As Long 'Need a timer ID to eventually turn off the timer. If the timer ID <> 0 then the timer is running

Public Sub ActivateTimer(ByVal nMinutes As Long)
    nMinutes = nMinutes * 1000 * 60 'The SetTimer call accepts milliseconds, so convert to minutes
    If TimerID <> 0 Then Call DeactivateTimer 'Check to see if timer is running before call to SetTimer
    TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer)
    If TimerID = 0 Then
        MsgBox "The timer failed to activate. Checking of email will not happen."
    End If
End Sub

Public Sub DeactivateTimer()
    Dim lSuccess As Long
    lSuccess = KillTimer(0, TimerID)
    If lSuccess = 0 Then
        MsgBox "The timer failed to deactivate."
    Else
        TimerID = 0
    End If
End Sub

Public Sub TriggerTimer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long)
    'keeps calling every X Minutes unless deactivated
    If idevent = TimerID Then Call SyncOL
End Sub

Public Sub SyncOL()
    ' Synchronizes (ie sends/receives) OL folders.
    ' Ref: http://msdn.microsoft.com/en-us/library/ff863925.aspx

    Dim appOL As Outlook.Application, objNsp As Outlook.NameSpace
    Dim colSyc As Outlook.SyncObjects, objSyc As Outlook.SyncObject
    Dim i As Integer

    On Error GoTo SyncOL_Err

    ' Use late binding to avoid the "Reference" issue.
    If isAppThere("Outlook.Application") = False Then
        Set appOL = CreateObject("Outlook.Application")  ' OL not open
    Else
        Set appOL = GetObject(, "Outlook.Application")  ' OL already open
    End If

    Set objNsp = appOL.Application.GetNamespace("MAPI")
    Set colSyc = objNsp.SyncObjects

    For i = 1 To colSyc.Count
        Set objSyc = colSyc.Item(i)       
        ' Debug.Print objSyc.Name
        objSyc.start
    Next

    ' Call MsgBox("Outlook synchronization initiated ...", vbInformation)

    SyncOL_Exit:
    Set appOL = Nothing: Set objNsp = Nothing: Set colSyc = Nothing: Set objSyc = Nothing
    Exit Sub

    SyncOL_Err:
    MsgBox "error=" & Err.Number & " " & Err.Description & " in SyncOL()"
    Resume SyncOL_Exit
End Sub

Once up and running (and you've disable push or any existing timers), then this code will run every 30 minutes and trigger a send and receive. Since I don't have Outlook connected to Exchange I cannot verify this actually works.

  • Does this code trigger synchronization with the Exchange server, or instead imitate the behavior of the Send/Receive button (or pressing F9)? The latter has no effect on an Exchange account in Outlook. – I say Reinstate Monica Jan 12 '15 at 19:18
  • It triggers send/receive on the groups you have defined so probably the closest to imitating the F9 button. If pressing F9 doesn't work for an Exchange account then this probably won't work either. Sorry. – Richard Jan 12 '15 at 19:57
  • One thought, the code could be updated so that every 30 minutes it takes Outlook out of "offline" mode, does a Send/Receive and then puts it back into "offline" mode. Would that solve the problem? – Richard Jan 12 '15 at 20:01
  • No, unfortunately Outlook's Send/Receive functionality has absolutely no effect with an Exchange account. – I say Reinstate Monica Jan 12 '15 at 20:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.