How to Convert ANSI PST to Unicode PST File via Outlook VBA

ANSI format, as the old format of Outlook PST file, has many disadvantages. Thus, if you would like to convert ANSI PST file to Unicode PST file, you can use VBA to quickly achieve it, which will be introduced elaborately in this article.

In Microsoft Outlook 2010 and earlier versions, the PST files are in ANSI format by default. The PST file in the old format has a size limit of 2 GB. Moreover, it has a limit of up to 65000 items in each folder. Compared with ANSI format, the new format, Unicode that is applied since Outlook 2003 and newer versions has many advantages. For instance, it has a greatly increased file size limit of 20 GB. Also, it has no restriction in the amount of items per folder. Hence, it is highly suggested to upgrade the PST file from ANSI to Unicode format. However, Outlook does not offer any inbuilt tools for this requirement.

Convert ANSI PST to Unicode PST File via Outlook VBA

Of course, you can use other workarounds, such as creating a PST file in Unicode format and then move all items from the PST file in ANSI format to the new file via manual moving, “Import/Export” or “Archive” feature. Nevertheless, by any of them, the format conversion will be a quite tedious task. Therefore, in response to this issue, here we will introduce you a much simpler method, which can use VBA to convert ANSI PST file to Unicode PST file in quick time. Now read on to get the detailed steps.

Convert ANSI PST to Unicode PST File

  1. At the very outset, launch your Outlook.
  2. Then press “Alt + F11” key buttons in the main Outlook window.
  3. Next in the “Microsoft Visual Basic for Applications” window, open a module.
  4. Subsequently, copy the following VBA codes into the module window.
Private Sub ConvertANSIToUnicode()
    Dim objSourceFileFolders As Outlook.Folders
    Dim objFolder As Outlook.Folder
    Dim objNewPSTFileFolder As Outlook.Folder
    'Create a new PST file in Unicode format in your preferred local folder
    Outlook.Application.Session.AddStoreEx "E:\NewPST1.pst", olStoreUnicode
    Set objNewPSTFileFolder = Session.Folders.GetLast()
    'Get all the folders of the source PST file which is in old ANSI format
    'Change the "Personal" to the display name of your own PST file
    Set objSourceFileFolders = Outlook.Application.Session.Folders("Personal").Folders

    For Each objFolder In objSourceFileFolders
        objFolder.CopyTo objNewPSTFileFolder
End Sub

VBA Code - Convert ANSI PST to Unicode PST File

  1. After that, you can add the new macro to Quick Access Toolbar or ribbon.
  2. Later change your Outlook macro security level to low.
  3. Eventually you can just click on the macro button in Quick Access Toolbar or ribbon to trigger this subroutine.
  4. At once, a new Outlook data file will show up in mail navigation pane, which contains all the items of the source ANSI PST file.

Escape from Painful PST File Damage

If you find that your PST file is compromised somehow, then what should you do to rescue your damaged Outlook PST data? Outlook comes packed with an inbuilt tool – Scanpst.exe. Thus, you can firstly use it to have a try. If unfortunately, it fails, you can continue to take resource to a more remarkable tool such as DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover sql and outlook repair software products. For more information visit

Leave a Reply

Your email address will not be published. Required fields are marked *