PersonalStorage.SaveAs

SaveAs(string, FileFormat)

Saves the storage to another file in the specified format.

public void SaveAs(string fileName, FileFormat format)
ParameterTypeDescription
fileNameStringThe path of the file to create.
formatFileFormatThe format to save in.

Remarks

Use it for a fast OST to PST conversion. It does not support OST files of Outlook 2013 and later; to convert such a file, create a new PST and call its MergeWith method.

Examples

This example converts an OST file to PST.

[C#]

using (var ost = PersonalStorage.FromFile("mailbox.ost"))
{
    ost.SaveAs("mailbox.pst", FileFormat.Pst);
}

[Visual Basic]

Using ost As PersonalStorage = PersonalStorage.FromFile("mailbox.ost")
    ost.SaveAs("mailbox.pst", FileFormat.Pst)
End Using

See Also


SaveAs(Stream, FileFormat)

Saves the storage to a stream in the specified format.

public void SaveAs(Stream stream, FileFormat format)
ParameterTypeDescription
streamStreamThe stream to write to.
formatFileFormatThe format to save in.

Remarks

Use it for a fast OST to PST conversion. It does not support OST files of Outlook 2013 and later; to convert such a file, create a new PST and call its MergeWith method.

See Also