PageSetupDialog.SetOption
-------------------------

Sets an option.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PrintDialog](component_PrintDialog.md) | [9.2](newinversion92.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "PageSetupDialog.SetOption"; Key; Value { ; Type } ) 

**MBS**( **"PageSetupDialog.SetOption"** /\* Sets an option. \*/  
**$Key**; /\* The key to use. \*/   
**$Value**; /\* The value to use.  
Depending on data type, the plugin will pass a number or a text. e.g. 3 \*/   
**$Type**) /\* Optional; The type of data to add.   
Default is empty to use type of value passed. So text or number type would be picked automatically.  
Valid values for type are text, number, integer and text.  
Integer is for integer numbers while number is for floating numbers. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Key | The key to use. |  |  |
| Value | The value to use.   Depending on data type, the plugin will pass a number or a text. | 3 |  |
| Type | The type of data to add.    Default is empty to use type of value passed. So text or number type would be picked automatically.   Valid values for type are text, number, integer and text.   Integer is for integer numbers while number is for floating numbers. |  | Optional |

### Result

Returns OK or error.

### Description

Sets an option.  
You can use [PrintDialog.GetLastSettings](PrintDialogGetLastSettings.md) after printing to query XML with all settings and pick keys and values.  
### See also

- [PageSetupDialog.ClearOption](PageSetupDialogClearOption.md)
- [PageSetupDialog.ClearOptions](PageSetupDialogClearOptions.md)
- [PageSetupDialog.GetNoDialog](PageSetupDialogGetNoDialog.md)
- [PageSetupDialog.GetOption](PageSetupDialogGetOption.md)
- [PageSetupDialog.SetNoDialog](PageSetupDialogSetNoDialog.md)
- [PrintDialog.GetLastSettings](PrintDialogGetLastSettings.md)

This function checks for a license.

Created 20th April 2019 , last changed 14th July 2022

  
[PageSetupDialog.SetNoDialog](PageSetupDialogSetNoDialog.md) - [PageSetupDialog.SetPaperHeight](PageSetupDialogSetPaperHeight.md)

[HTML Version](PageSetupDialogSetOption.shtml)