sometimes when trying to delete an additional outlook .ost file it may not delete it and you get an error message that says:
“This data file is associated with an email account. to remove it use the ’email’ tab”
exactly what this message is saying is that there is a ‘data file’ associated with an ’email account’ and you cannot delete that data file unless you delete the associated email account.
If you are facing this specific error and are having a hard time resolving it, here are some workarounds that might help you fix the error.
workarounds to fix “this data file is associated with a mail account ost file”
several outlook users were able to resolve the issue by following these workarounds:
workaround 1: remove email account from ost file
The first and simplest step is to delete the email account corresponding to the ost file from the “email” tab in the outlook account settings. the detailed steps are as follows:
- open your outlook application, click the file menu.
- from the info screen, click account settings > account settings.
figure 2: outlook account settings
- In the account settings dialog that appears, select the email account you want to delete, and then click the “delete” tab.
figure 3: deleting email account from outlook
- Now try to delete the ost file associated with the email account you deleted.
If the problem persists, please move to the next workaround.
Workaround 2: Delete the damaged outlook profile and create a new profile
If you cannot find the email account (corresponding to the ost file you want to delete) in the “email” tab, your outlook profile may be corrupted.
Note: If you want to delete an ost file associated with an email account that appears to not exist, you have a ghost (hidden) email account/ost file. in that case, please move to the next solution to fix “this data file is associated with a mail account ost file” error.
If you don’t have too many accounts in your outlook profile, you can delete the profile and ost file and then create a new profile. But, before deleting the existing Outlook data file, make sure to back up the file data to a PST file using the Outlook Import Export Wizard. however, to back up multiple ost files, we recommend using a specialized ost to pst conversion tool.
Also read: Free methods to convert ost to pst in outlook 2019/ 2016/ 2013/ 2010/2007
To create a new profile, do the following:
- open the control panel and click on the mail option.
figure 4 – control panel elements
- Select show profiles in the mail settings – outlook dialog.
figure 5: select show profiles in mail settings
- click the add button.
figure 6: select add in the mail window
- Specify the name of your new outlook profile and then click ok.
figure 7 – enter the new outlook profile name
once you’ve done all these steps, start outlook with the new profile and add all your email accounts to it.
workaround 3: delete ost files via registry editor
You can try to remove a ghost email account/ost file from the registry by following these steps:
- Open the registry editor by pressing a ‘windows+r’ key combination.
- When the run dialog appears, type regedit.< /li
- In the registry editor window, find your outlook profile key.
for outlook 2016, the profile key can be found at:
hkey_current_usersoftwaremicrosoftoffice16.0outlookprofiles
for outlook 2013, the profile key can be found at:
hkey_current_usersoftwaremicrosoftoffice15.0outlookprofiles
for outlook 2010 or earlier, the key can be found in the windows messaging subsystem:
hkey_current_usersoftwaremicrosoftwindows ntcurrent versionwindows messaging subsystemprofiles
note: save the key in case you accidentally delete it.
- Expand each key to find the ghost account and remove it.
note: there may be more than one key that contains the ghost ost file. if so, make sure to remove all keys that have that ost file.
After performing these steps, create a new outlook profile (follow steps 1-4 in workaround 2).
conclusion
There is no specific reason that leads to the problem “this data file is associated with a mail account ost file”. However, based on user experiences, we can say that the problem arises due to a ghosted email account/ost file or due to a corrupted outlook profile. try the methods discussed in this blog to resolve the issue. The first and the easiest solution is to remove the email account from the email tab in the outlook account settings window. But, if you can’t find the email account the data file is associated with, try creating a new outlook profile and delete the existing one. Or remove the email account from the registry.
Regardless of the method selected, be sure to back up your ost file data to a pst file using outlook’s built-in “import and export wizard” or stellar converter for ost software.