> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AddNew Method of the DocumentDefinitions Object

This method creates a new Document Definition for semi-structured documents and adds it at the end of the collection. A default section definition is also created.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew(
  Name As String _
) As DocumentDefinition
```

```cpp C++ theme={null}
HRESULT AddNew(
  BSTR                  Name,
  IDocumentDefinition** Result
);
```

## Parameters

**Name**

\[in] This variable specifies the name of the Document Definition. This parameter may be 0 or an empty string. In this case the name is generated automatically.

**Result**

\[out, retval] A pointer to the [**IDocumentDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinition.md)**\*** variable that receives the interface pointer for the added Document Definition.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**DocumentDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/documentdefinitions.md)
