0

I spend a lot of time in Outlook in-flight where the connection is spotty. For years, I've noticed the UI often freezes for several seconds, sometimes longer, if it loses connection with Exchange while syncing. I don't understand why the Exchange sync isn't asynchronous -- other MUAs like Thunderbird and mail.app don't behave like this. I've always wondered if this is normal behavior for Outlook and/or if there is any workaround, short of working completely offline and then periodically manually going online to sync recent mail.

I do have cached exchange mode enabled and cache all my mail locally.

I'm currently using the latest build of the O365 Desktop Application on Win10 22H2, but have seen this issue for 20+ years.

5
  • Yes, it has been this way for a long time. As long as I can remember. What is your specific question that we can solve? Commented Oct 26, 2023 at 21:53
  • The question is: is there any workaround to make Outlook more usable with spotty Internet connection? I've seen some suggestion that disabling Exchange Fast Access might be what I'm looking for, but I just tried it and don't see any noticeable change. Essentially, is there any way to force Outlook to just use cached data and not always wait on an Exchange server connection? Doesn't the default behavior somewhat default the purpose of cached exchange mode? Commented Oct 26, 2023 at 22:02
  • Offline mode is the only way I'm aware of to prevent Outlook hanging up trying to communicate w/ the Exchange server. Commented Oct 26, 2023 at 22:12
  • I suppose I could implement a COM call that periodically toggles offline mode in the background, mimicking MUAs like Thunderbird that check for mail on a schedule rather than continuously. It seems crazy that a product as widely used as Outlook doesn't have a better way to handle the very common situation of intermittent connectivity. Commented Oct 26, 2023 at 22:18
  • superuser.com/questions/49995/… Also, in searching the 'net it appears Powershell can enable/disabled Outlook's offline mode. Given the complexities of running Powershell scripts, I think the keyboard shortcuts are likely the simplest method, or you can put the offline mode toggle button in the Quick Access toolbar. Commented Oct 26, 2023 at 22:26

2 Answers 2

2

I agree that using shortcut keys to set offline mode is faster. If you use a script, you may need the SyncObjects method to switch offline mode. Timing background switching may require additional scripts (such as timers or loops).

0
0

Here's an autohotkey script that goes offline for a defined duration and then online for a different defined duration. It requires also implementing VBA code (shown further below) to store the "sync" status in a persistent storage item. It's a pretty awful hack but seems to do the job.

{
TimeOff := 15
TimeOn := 1
Outlook := ComObjActive("Outlook.Application")
; always start online
if ( Outlook.GetNamespace("MAPI").Offline ) {
   Outlook.ActiveExplorer.CommandBars.ExecuteMSO("ToggleOnline")
}
loop {
; go offline
Outlook.ActiveExplorer.CommandBars.ExecuteMSO("ToggleOnline")
; wait TimeOff minutes
Sleep TimeOff*60000
; go online
Outlook.ActiveExplorer.CommandBars.ExecuteMSO("ToggleOnline")
done := 1
; wait TimeOn minutes
Sleep TimeOn*60000
; force sync
Outlook.Session.SyncObjects.Item(1).start
; don't go offline again until sync is done
while (done != 0) {
done := Outlook.Session.GetDefaultFolder(6).GetStorage("sync",0).UserProperties("online").value
Sleep 1000
}
}
}

And then in Outlook VBA:

Public myStorage As Outlook.StorageItem
Private Sub Application_Startup()
  SyncRunning = False
  Set mySync = Session.SyncObjects.Item(1)
  Set myStorage = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("sync", olIdentifyBySubject)
  myStorage.UserProperties("online").Value = 10
  myStorage.Save
End Sub
Private Sub mySync_SyncEnd()
  myStorage.UserProperties("online").Value = 0
  myStorage.Save
End Sub
Private Sub mySync_SyncStart()
  myStorage.UserProperties("online").Value = 1
  myStorage.Save
End Sub
Private Sub Application_Quit()
  Set mySync = Nothing
End Sub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .