When trying to add a single shared mailbox to Outlook I was getting the generic message. “The set of folders cannot be opened. The file … is in use and cannot be accessed. Close any application that is using this file, and then try again, You might need to restart your computer”. This shared mailbox worked fine in Outlook web access.
The issue was only effecting a single mailbox, this mailbox was using a a newly added domain name separate to other mailboxes.
It turned out the autodiscover CNAME record had not been set correctly for the domain, resulting in the Outlook client being unable to locate the server for the mailbox.
I added the CNAME record autodiscover pointing to autodiscover.outlook.com