
## addSwitch(switchName) {#string}

Adds a field's switch.


```js
addSwitch(switchName: string)
```

| Parameter | Type | Description |
| --- | --- | --- |
| switchName | string | The switch name. |

### Remarks

This overload adds a flag (switch without argument).


## addSwitch(switchName, switchArgument) {#string_string}

Adds a field's switch.


```js
addSwitch(switchName: string, switchArgument: string)
```

| Parameter | Type | Description |
| --- | --- | --- |
| switchName | string | The switch name. |
| switchArgument | string | The switch value. |

## addSwitch(switchName, switchArgument) {#string_number}

Adds a field's switch.


```js
addSwitch(switchName: string, switchArgument: number)
```

| Parameter | Type | Description |
| --- | --- | --- |
| switchName | string | The switch name. |
| switchArgument | number | The switch value. |

## addSwitch(switchName, switchArgument) {#string_number}

Adds a field's switch.


```js
addSwitch(switchName: string, switchArgument: number)
```

| Parameter | Type | Description |
| --- | --- | --- |
| switchName | string | The switch name. |
| switchArgument | number | The switch value. |

## See Also

* module [Aspose.Words.Fields](../../)
* class [FieldBuilder](../)

