
## Replace {#replace}

Replaces an element at the specified index.

**Returns:** void Aspose::Email::Mapi::

```cpp
Replace(int32_t index, System::String name, System::SharedPtr < MapiMessage > msg)
```

| Parameter | Description |
| --- | --- |
| index | The zero-based index at which should be replaced. |
| name | The name of attachment. |
| msg | The MapiMessage that represents the attached message. |

