# Javascript: DocumentSettings.setAuthor Method

> Sets the author of the current document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: DocumentSettings.setAuthor Method
- **326 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/setauthor-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/setauthor-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/setauthor-method/llms-full.txt

---

### Description

Sets the author of the current document.

### Syntax

```javascript
<void> DocumentSettings.setAuthor(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| value | The property value. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `DocumentSettings.setAuthor` in a practical document-editing workflow. It sets the author of the current document.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.documentSettings.setAuthor(
    "Contoso Finance Team",
    function() {
        console.log("set author completed.");
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: DocumentSettings.getUserDefinedDocumentProperties Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getuserdefineddocumentproperties-method/llms-full.txt)
- **Next:** [Javascript: DocumentSettings.setCreationDate Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/setcreationdate-method/llms-full.txt)
