Outlook 2011 - AppleScript to remove all accounts

mapurcel
Contributor III

as part of our o365 upgrade we're considering removing all exchange accounts from the Outlook 2011 client before the import to Outlook 2016. That way the 'On My Computer' data will get imported but the user will setup a fresh account that brings down mail from the server rather than importing exchange data (which is slow). Does anyone know the AppleScript command to remove all accounts from Outlook? thanks!

3 REPLIES 3

mapurcel
Contributor III

ok I think I got it:

tell application "Microsoft Outlook" delete every exchange account
end tell

rmhughes
New Contributor

Hi Mapurcel,

Do you know that Office 2016 saves its offline content to different folder than Office 2011 (Documents > Microsoft My user data).

Not sure your offline emails will load into Office 2016 automatically.
Rhys

mapurcel
Contributor III

@rmhughes yes I am aware that its in a different location. My assumption was that it would import the 'On my computer' content from the identity, regardless of whether there was an exchange account setup in the identity. I haven't really confirmed this because we've changed course and are having the users import the account as part of the identity.