logo
search
Outlook Error Codes

How to Fix Outlook VBA Error 80070057 When Saving a MailItem

Maira MehtabMaira Mehtab Oct 26, 2026 869 views

Question details

The user needs to resolve a VBA error that prevents an email macro from saving a MailItem to the Drafts folder.

How to Fix Outlook VBA Error 80070057 When Saving a MailItem
Product
Microsoft Outlook
Device & OS
not provided
Scenario
Running an Outlook VBA macro to generate and save a draft email after adding a secondary email account to the Outlook profile.
Observed behavior
The VBA script throws runtime error -2147024809 (80070057) on the MailItem.Save method because the destination folder, account store, sender, or recipient objects become invalid or ambiguous when multiple accounts are present.
Before you start

Before modifying your VBA code, ensure you have backed up your current Outlook macros and verify the exact email addresses associated with the multiple accounts in your Outlook profile.

Solution 1Recommended

Explicitly Resolve the Target Account and Drafts Folder

Update your VBA script to target the correct Outlook store and explicitly assign the email to that specific account's Drafts folder to prevent ambiguity.

When a secondary account is added to Outlook, the default application context may no longer know which account's Drafts folder to use. Explicitly defining the Store and mapping the MailItem to it resolves the 80070057 error.

1
Open the VBA Editor

Press ALT + F11 in Outlook to open the Visual Basic for Applications editor and locate the macro generating the error.

2
Identify the correct Outlook Store

Modify your code to loop through 'Application.Session.Stores' or 'Application.Session.Accounts' to find the specific account you want to send from.

3
Assign the SendUsingAccount property

Set the 'MailItem.SendUsingAccount' property to the matched account object to ensure the sender is valid.

4
Resolve the Drafts folder explicitly

Use 'Store.GetDefaultFolder(olFolderDrafts)' to get the correct Drafts folder for that specific account.

5
Move and Save the MailItem

Instead of a generic '.Save', use 'MailItem.Move(targetDraftsFolder)' or set the item's saved location explicitly before calling the Save method.

Explicitly Resolve the Target Account and Drafts Folder
Testing accounts separately: Always test your updated VBA code with each Outlook account separately to ensure the folder resolution works dynamically for all accounts in the profile.
Free Microsoft Office alternative

Upgrade Your Productivity with WPS Office

If you are tired of complex VBA script errors and troubleshooting multi-account issues in Microsoft Office, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for your daily document workflows without the steep technical learning curve.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free installation package.
  2. 2. Install WPS Office: Run the installer and follow the on-screen prompts to set up the software on your computer.
  3. 3. Open Your Documents: Launch WPS Office to easily open, edit, and save your existing Microsoft Office files.
Avoid complex VBA scripting errors with streamlined document workflowsHighly compatible with Microsoft Office formats (Word, Excel, PowerPoint)Free and lightweight Office alternative that consumes fewer system resourcesFamiliar user interface for a seamless migration experience
microsoft office alternative - wps office

Frequently Asked Questions

Why does MailItem.Save work with one account but fail with multiple?

When a secondary account is added, Outlook may lose context of the default data store. You must explicitly define which account's Drafts folder the MailItem belongs to so Outlook knows exactly where to save the file.

Does the MailItem.Display method bypass error 80070057?

Calling the Display method allows the email to render on screen and be sent manually, but it does not fix the underlying folder or recipient resolution issue that prevents programmatic saves to the Drafts folder.

How do I verify if a recipient object is valid in Outlook VBA?

You can use the Recipient.Resolve method in your VBA script. If the method returns True, the recipient is valid and properly linked to a recognized AddressEntry in your address book.