---
title: "Aspose::Email::Storage::Pst::PersonalStorage::SaveAs method"
url: "https://reference.aspose.com/email/cpp/aspose.email.storage.pst/personalstorage/saveas/"
product: "Aspose.Email for C++"
description: "Saves the current object to a specified file format in a stream."
---


## SaveAs (1 of 2) {#saveas_1}

Saves the current object to a specified file format in a stream.

**Returns:** void Aspose::Email::Storage::Pst::

```cpp
SaveAs(System::SharedPtr < System::IO::Stream > stream, FileFormat format)
```

| Parameter | Description |
| --- | --- |
| stream | The stream to be saved. |
| format | The FileFormat is to be used. |

---

## SaveAs (2 of 2) {#saveas_2}

Saves the current object to a specified file format in a different file.

**Returns:** void Aspose::Email::Storage::Pst::

```cpp
SaveAs(System::String fileName, FileFormat format)
```

| Parameter | Description |
| --- | --- |
| fileName | The name of the file to be saved. |
| format | The FileFormat is to be used when saving a file. |

