Converting OST to PST Problem

Hello,
According to this post:

I use the provided source code:

Using MyStorage As Email.Storage.Pst.PersonalStorage = Email.Storage.Pst.PersonalStorage.FromFile(“D:\source.ost”)
MyStorage.SaveAs(“D:\target.pst”, Email.Storage.Pst.FileFormat.Pst)
End Using

To convert OST to PST and I get NotImplementedException with error message:
The method or operation is not implemented.

Plus, although error is shown, the target PST file is created but exactly identical to the source OST file!
Used FC.exe and all the same!

@australian.dev.nerds

Could you please ZIP and attach your input OST file here for testing? We will investigate the issue and provide you more information on it.

Hello,
Sure, here you go…

Exactly with this code I’ve got from your help:

Using MyStorage As Email.Storage.Pst.PersonalStorage = Email.Storage.Pst.PersonalStorage.FromFile(“D:\source.ost”)
MyStorage.SaveAs(“D:\target.pst”, Email.Storage.Pst.FileFormat.Pst)
End Using

Aust.Dev.Nerd@gmail.com.zip (240.9 KB)

@australian.dev.nerds

We have logged this problem in our issue tracking system as EMAILNET-40701. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello,
In case you need to have a ready to run project that demonstrates the NotImplementedException here it is.

Anyway please add these notes to the case:

After running the code and getting the exception run this command in Command Prompt:
FC \source.ost \target.pst

Result: FC: no differences encountered.
This means that PersonalStorage.SaveAs is just using Copy internally?

IO.File.Copy (\source.ost , \target.pst)

WindowsApplication1.zip (3.9 MB)

@australian.dev.nerds

Unfortunately, for OST files created by Outlook version 2013 and later, modification is not supported because of the difference in formats and lack of format documentation.

The API supports converting OST formats to PST except OST 2013/2016. Please read the detail from here:
Converting OST to PST

So, OST to PST for Office 2021 is also not supported…

And on the page is written that PST to OST is also totally not supported right?

BTW, when throwing NotImplementedException, copying the source file to target file is absolutely a wrong behavior.

@australian.dev.nerds

As shared in my previous post, the API supports converting OST formats to PST except OST 2013/2016.

1 Like

Let me ask something, reading of OST is fully supported, even newer OST files up to 2021.
And writing of PST is also fully supported.
Converting OST to PST should create a new PST, read all items from OST and write to the new PST.
So this should be technically possible right?
I think it’s valuable to add it to the feature list so the storage converter support real PST as target :slight_smile:

@australian.dev.nerds

How about using MergeWith? It’s the same thing, technically :slight_smile:

PersonalStorage pst = PersonalStorage.Create(@"some.pst", FileFormatVersion.Unicode);

pst.MergeWith(new[] {@"some.ost"});

Thanks.