Outlook 2011 fix autodiscover

…or rather disable autodiscover.

At my place of work, we have various options for remote access. If you have a corporate laptop, you can connect via VPN and have full access to all internal systems. Or, if you just need to check mail, you can fire up Outlook and it will connect with or without the VPN (I think this is using Exchange Web Services, but don’t hold me to that). Finally, if you don’t have a corporate laptop, you can connect to Outlook Web Access and do your emailing and IMing that way. All fairly normal.

Except… while my laptop is supplied by my employer, it’s a Mac (for various complicated reasons). Our environment is Microsoft-based and isn’t really set up or tested to be Mac-friendly — which is fair enough. Plus Microsoft quite obviously doesn’t put as much effort into the Mac version of Office as they do into the Windows version.

So: I can enter the appropriate details into the server configuration preferences for Outlook and everything will work remotely, without needing a VPN connection — helpful when working on things which require me to be disconnected from the office network. But as soon as open Outlook “inside” the corporate network (whether physically in the office, or on VPN) the mailserver details I entered are replaced with the fully-qualified name. Which doesn’t work outside the office.

This was irritating but something I could cope with until last week, when problems with the endpoints meant my VPN connections were very unstable. Not knowing that this problem was related to autodiscover, it took me a little while to figure out the right search to lead me to this helpful comment on officeformachelp.com (which simplifies the advice in the article). So, to disable autodiscover (and this annoying behaviour), I created and ran this applescript:

tell application “Microsoft Outlook”
set background autodiscover of every Exchange account to false
end tell

Which worked a treat. Just in case, I also created the following applescript:

tell application “Microsoft Outlook”
set background autodiscover of every Exchange account to true
end tell

to re-enable autodiscover. And now I’m happy 🙂