# SubTextPartCollection.AddResult Enumeration

> Specifies the result when a subtextpart has been added to the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 23.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > SubTextPartCollection.AddResult Enumeration
- **701 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/addresult-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/addresult-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/addresult-enumeration/llms-full.txt

---

### Description

Specifies the result when a subtextpart has been added to the document.

### Syntax

```csharp
public enum SubTextPartCollection.AddResult
```

```vbnet
Public Enum SubTextPartCollection.AddResult
```

### Members

| Member | Value | Description |
|---|---|---|
| AlreadyExists | 5 | The subtextpart wasn't inserted because it already exists. |
| Combined | 8 | The subtextpart was inserted and combined with an existing one. A subtextpart is combined with an existing one, when it immediately follows it and has the same name and id. |
| Error | 0 | An unexpected error has occurred. |
| NoSelection | 2 | The subtextpart wasn't inserted because there is no selection. |
| Overlapping | 7 | The subtextpart wasn't inserted because it overlaps with an existing textpart. |
| PositionInvalid | 4 | The subtextpart wasn't inserted because the specified position values are invalid. Invalid start and/or length values have been specified. |
| SelectionTooComplex | 3 | The subtextpart wasn't inserted because the selection is too complex. It is not a continuous sequence of characters. |
| Successful | 1 | The subtextpart has successfully been inserted. |

### Examples

The following example selects the Error value from the Add Result enumeration and uses it as a documented workflow choice.

```csharp
SubTextPartCollection.AddResult value = SubTextPartCollection.AddResult.Error;
Console.WriteLine($"Using Add Result: {value}");
```

```vbnet
Dim value As SubTextPartCollection.AddResult = SubTextPartCollection.AddResult.Error
Console.WriteLine($"Using Add Result: {value}")
```

---

## Nearby

- **Previous:** [SubTextPartCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/add-method/llms-full.txt)
- **Next:** [SubTextPartCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/subtextpartcollection/copyto-method/llms-full.txt)
