Hack: Microsoft Outlook AutoComplete

Outlook maintains the AutoComplete list. The list is used by both the automatic name-checking feature and the automatic completion feature. The AutoComplete list, also known as the nickname cache, is generated automatically when you send email messages from Outlook. The list contains SMTP addresses, LegacyExchangeDN entries, and display names for people to whom you have sent mail previously.

Note The AutoComplete list for Outlook is specific to Outlook and is not shared by Outlook Web App (OWA). OWA maintains its own AutoComplete list.

The following sections provide information about the AutoComplete feature.

Limit to the number of entries

Outlook limits the number of entries that you can save in the AutoComplete list. After you reach this limit, Outlook uses an internal algorithm to determine the best names to remove from the list. It does this based on a usage weighting. Therefore, you may find some names unexpectedly removed from your nickname cache. There are two general approaches that you can use to avoid this situation:

  1. You can proactively remove AutoComplete list entries that you no longer need. This is the preferred approach. For more information about how to do this, see the section titled “How to remove AutoComplete list entries one at a time.”
  2. You can increase the limit for the nickname cache. If you have a larger nickname cache, you could also lose a larger number of cached entries if your nickname cache becomes unusable because of corruption.

The limits are as follows:

  • Outlook 2016: 1,000 entries
  • Outlook 2013: 1,000 entries
  • Outlook 2010: 1,000 entries
  • Outlook 2007: 2,000 entries
  • Outlook 2003: 1,000 entries

How to enable the AutoComplete feature

Outlook 2010, Outlook 2013, and Outlook 2016

To access the AutoComplete setting, follow these steps:

  • On the File menu, click Options.
  • Select the Mail tab.
  • Scroll approximately halfway down until you see Send messages. Make sure that the Use Auto-Complete List to suggest names when typing in the To, Cc, and Bcc lines box is checked. If you need to disable Auto-Complete uncheck the box.

How to import .nk2 files into Outlook 2010, Outlook 2013, and Outlook 2016

Microsoft Office Outlook 2007 and earlier versions store the AutoComplete list in an nickname (.nk2) file on the disk. Outlook 2010, Outlook 2013, and Outlook 2016 store the AutoComplete list as a hidden message in your primary message store. Outlook 2010, Outlook 2013, and Outlook 2016 let you import the older .nk2 files.

For more information about how to import .nk2 files in Outlook 2010, go to the following Microsoft website:

 

How to import .nk2 files into Outlook 2013 or Outlook 2016

When you start Microsoft Outlook 2013 or Outlook 2016 for the first time, your nickname cache (stored in the  profilename.nk2 file) is imported into a hidden message in your default message store.

Note profilename is the name of your Outlook profile.

For example, if you are using a Microsoft Exchange account, the nickname cache is imported into a hidden message in the Exchange mailbox.

Note Outlook 2007 and earlier versions store the nickname cache .nk2 file in the following folder.

  • Windows XP
    Drive:\Documents and Settings\Username\Application Data\Microsoft\Outlook
  • Windows Vista and later versions
    Drive:\Users\Username\AppData\Roaming\Microsoft\Outlook

After the nickname cache is imported, the
profilename.nk2 file is renamed to
profilename.nk2.old. On the next start of Outlook, your nickname cache is not imported. Outlook 2013 and Outlook 2016 do not use the .nk2 file for maintaining your nickname cache. All updates to your nickname cache in Outlook 2013 and Outlook 2016 are made to the hidden message in your default message store.

Note If you have multiple Outlook profiles, the nickname cache from each profile is merged into your new Outlook 2013 or Outlook 2016 nickname cache on the first start of Outlook by using that profile. Therefore, you may find more than one .nk2 file renamed to .nk2.old.

However, there may be situations where you have to import a nickname cache file after this first-run nickname cache import process has finished. For example, a colleague wants to share their nickname cache with you and you want to update your existing nickname cache with your colleague’s data.

To import .nk2 files into Outlook 2013 or Outlook 2016, follow these steps:

  • Make sure that the .nk2 file is in the following folder:
    %appdata%\Microsoft\Outlook

    Note The .nk2 file must have the same name as your current Outlook 2013 or Outlook 2016 profile. By default, the profile name is “Outlook.” To check the profile name, follow these steps:

    1. Click Start, and then click
      Control Panel.
    2. Double-click Mail.
    3. In the Mail Setup dialog box, click
      Show Profiles.
  • Click Start, and then click
    Run.
  • In the Open box, type
    outlook.exe /importnk2 , and then click
    OK. This should import the .nk2 file into the Outlook profile.
Note After you import the .nk2 file, the contents of the file are merged into the existing nickname cache that is currently stored in your mailbox.
Note The .nk2 file is renamed with a .old file name extension on the first start of Outlook 2013 or Outlook 2016. Therefore, if you try to re-import the .nk2 file, remove the .old file name extension.

How to copy the AutoComplete list

The steps to export and import the AutoComplete list are different, depending on the version of Outlook that you are using.

Outlook 2010, Outlook 2013, and Outlook 2016

To copy the AutoComplete list in Outlook 2010, Outlook 2013, and Outlook 2016, follow these steps:

Note: Please make sure the you are using the appropriate MFCMAPI for x86 or x64.

Step 1

To export the AutoComplete mailbox message, follow these steps:

  1. Exit Outlook, and then close Outlook Web Access or Outlook Web App (OWA) on all workstations that are connected to your mailbox.
  2. Download and install MFCMAPI from http://mfcmapi.codeplex.com.
  3. Run mfcmapi.exe.
  4. On the Session menu, click Logon.

  5. If you are prompted for a profile, select the desired profile name, and then click OK.

  6. In the top pane, locate the line that corresponds to your mailbox, and then double-click it.
  7. In the left-side navigation pane, expand Root Container, and then expand Top of Information Store or IPM_SUBTREE.
  8. Right-click the Inbox folder, and then click Open Associated Content Table. This action opens a new MFCMAPI window that contains various properties.

  9. Under the Subject column, right-click the item that has the subject IPM.Configuration.Autocomplete,


    and then click Export Message. This action opens the Save Message To File window.

  10. In the drop-down list, select MSG file (UNICODE), and then click OK.
  11. Select a folder location to which you want to save the message, and then click Save. Note this location.

Step 2

To import the AutoComplete mailbox message, follow these steps.

  1. Exit Outlook, and then close Outlook Web Access or Outlook Web App (OWA) on all workstations that are connected to your mailbox.
  2. Download and install MFCMAPI from http://mfcmapi.codeplex.com
  3. Run mfcmapi.exe.
  4. On the Session menu, click Logon.
  5. If you are prompted for a profile, select the desired profile name, and then click OK.
  6. In the top pane, locate the line that corresponds to your mailbox, and then double-click it.
  7. In the left-side navigation pane, expand Root – Mailbox, and then expand Top of Information Store or IPM_SUBTREE.
  8. Right-click the Inbox folder, and then click Open Associated Content Table. This action opens a new MFCMAPI window that contains various properties.
  9. To avoid duplicate entries, you must delete the existing AutoComplete message.
    Note: Before you delete the IPM.Configuration.Autocomplete message, you must export the message.

    To delete the existing AutoComplete message, follow these steps:

    1. In the Subject column, locate the item that has the subject IPM.Configuration.Autocomplete.
    2. Right-click the item, and then click Delete message. This opens the Delete Item window.
    3. In the drop-down list, select Permanent deletion (deletes to deleted item retention if supported), and then click OK.
    4. On the Folder menu, click Import, and then click From MSG.

    5. Locate the .msg file that you created in step 11 of the “How to Export the Auto-Complete List” section, and then click OK.
    6. In the Load MSG window that appears, select Load message into current folder in the Load style list, and then click OK.

The AutoComplete information is imported from the IPM.Configuration.Autocomplete_<hexadecimal code>.msg , where the placeholder <hexadecimal code>  represents a long string of numbers and letters.

How to remove AutoComplete list entries one at a time

To remove entries from the AutoComplete cache one entry at a time, follow these steps:

  1. Open a new email message.
  2. Type the first few characters of the AutoComplete entry that you want to remove.
  3. When the entry appears in the list of suggested names, move your mouse pointer over the name until it becomes highlighted, but do not click the name.
  4. When the “X” icon appears next to the highlighted name, click X to remove the name from the list, or press the Delete key on the keyboard.

How to clear the whole AutoComplete list

This section explains how to delete the AutoComplete list.

Outlook 2010, Outlook 2013, and Outlook 2016

Use one of the following two methods to delete the AutoComplete list in Outlook 2010, Outlook 2013, and Outlook 2016.

Method 1

  1. Open Outlook.
  2. On the File tab, click Options.
  3. Click the Mail tab.
  4. Under Send Messages, click Empty Auto-Complete List.

  5. Click Yes.

Method 2

Start Outlook by using the /CleanAutoCompleteCache switch. To do this, follow these steps:

  1. Click Start, and then click Run.
  2. Type Outlook.exe /CleanAutoCompleteCache .

    Note If Outlook is not installed in the default location, you must point to the path of Outlook.exe.

Filling the Auto-Complete list with Contact addresses

You can directly fill the list again by creating a new message addressed to all your contacts at once.

  1. Place Outlook in ‘Work Offline’ mode (see instructions below)
  2. Create a new message.
  3. Press the To… button.
  4. Select the contact list in the right top corner from which you would like to add the contacts from.
    Examples; Contacts folder, Global Address List (GAL) or a contacts folder in a Public folder.
  5. Select the first contact.
  6. Scroll all the way down to your last contact.
  7. Hold the SHIFT button on your keyboard while clicking on the last contact to select them all.
  8. Press the To –> button to add them all to the To… field.
  9. Repeat step 3 to 7 if you have contacts in additional lists that you would like to add.
  10. Press OK to close the dialog and to return to the newly created message.
  11. Now when you address a new message the AutoSuggest/Auto-Complete feature will pop-up again.

For Outlook 2010, Outlook 2013 and Outlook 2016, you must send the message to actually store these addresses in the AutoSuggest cache. However, by placing Outlook in Offline Mode first via the Send/Receive tab, you can easily prevent it from actually being sent by removing it from the Outbox and then place Outlook back online mode.

Working in Offline Mode

This is fairly simple for folks that dont know.

The main confusion is about Work Offline icon which is being displayed on the Send/Receive tab in the Ribbon in Outlook 2010 and Outlook 2013; you’ll find a globe with a red cross in front of it. This doesn’t mean you are in Offline Mode as the icon is always like this. The icon doesn’t change to for instance a globe without a red cross when you are Online

When you actually are in Offline Mode, the icon will show highlighted (as see below, when using a black color theme for Office 2016)  and your Status Bar will also show “Working Offline”. Clicking on the icon then will bring you back to Online Mode.

Status Bar:

POP3 Accounts:

When you are using a POP3 account, you can reuse your original pst-file on another computer or when reconfiguring the account without losing your AutoComplete cache. However, it is important that you do this in the correct way or the list will still be lost.