---
title: "Aspose::Email::Storage::Pst::PersonalStorage::GetCategories method"
url: "https://reference.aspose.com/email/cpp/aspose.email.storage.pst/personalstorage/getcategories/"
product: "Aspose.Email for C++"
description: "Retrieves a list of PST item categories, each containing a name and associated color."
---


## GetCategories {#getcategories}

Retrieves a list of PST item categories, each containing a name and associated color.

**Returns:** A List<PstItemCategory> containing all the available categories. The list will be non-empty if there is at least one item in the store that has the category assigned to it. If no categories are found or an error occurs, the list may be empty.

```cpp
GetCategories()
```

