WIA.SetItemPropertyValue
------------------------

Sets a property of an item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WIA](component_WIA.md) | [6.5](newinversion65.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "WIA.SetItemPropertyValue"; Item; Key; Value { ; Type } ) 

**MBS**( **"WIA.SetItemPropertyValue";** /\* Sets a property of an item. \*/  
**$Item**; /\* The item of current device to query.  
For a scanner this is typical Flatbed or Feeder.  
see [WIA.ListItems](WIAListItems.md)e.g. "Flatbed" \*/   
**$Key**; /\* The property key.  
Can be a text with the name of the property or the corresponding ID.e.g. "Name" \*/   
**$Value**; /\* The new value for this property. \*/   
**$Type**) /\* Optional; The data type to use.  
By default if empty or auto, we detect it based on the type of the existing property.  
Can be Boolean, Int16, Int32, Int64, UInt16, UInt32, UInt64, GUID, CLSID, String or Double.e.g. "Int32" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Item | The item of current device to query.   For a scanner this is typical Flatbed or Feeder.   see [WIA.ListItems](WIAListItems.md) | "Flatbed" |  |
| Key | The property key.   Can be a text with the name of the property or the corresponding ID. | "Name" |  |
| Value | The new value for this property. |  |  |
| Type | The data type to use.   By default if empty or auto, we detect it based on the type of the existing property.   Can be Boolean, Int16, Int32, Int64, UInt16, UInt32, UInt64, GUID, CLSID, String or Double. | "Int32" | Optional      Added in version **12.1**. |

### Result

Returns OK or error.

### Description

Sets a property of an item.  
Please query with [WIA.ItemProperties](WIAItemProperties.md) to see what keys and values are possible. You may want to query before and after setting the value via dialog.  
### Examples

Set resolution:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Horizontal Resolution"; 300 ) &amp;   
MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Vertical Resolution"; 300 )  
Set rotation:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Rotation"; 2 )  
// 0 = Portrait, 1 = Landscape, 2 = Rotate 180, 3 = Rotate 270  
Set gray or color:

 MBS ( "WIA.SetItemPropertyValue"; "Feeder"; "Current Intent"; 2)   
// 1 = color   
// 2 = gray  
Set duplex:

 Set Variable \[ $r ; Value: MBS ( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 4 )  
/\*  
1 = feeder  
2 = flatbed  
4 = duplex  
8 = front first  
16 = back first  
32 = front only  
64 = back only  
128 = next page  
256 = preferred  
512 = auto advance  
  
see  
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-dps-document-handling-select  
  
\*/ \]   
Show Custom Dialog \[ "Set duplex" ; $r \]  
Set to ignore blank pages:

 Set Variable \[ $r ; Value: MBS ( "WIA.SetItemPropertyValue"; "Feeder"; "Blank Pages"; 1 )  
/\*  
0 = Blank page detection is disabled. This is the required default value if the property is supported.  
1 = The device detects blank pages and automatically skips scanning them (discards scanned data if any) and continues scanning.  
2 = The device detects blank pages and acts as configured through the Job Separators property. This value is valid only when the Feeder item supports the Job Separators property.  
  
see  
https://docs.microsoft.com/en-us/windows-hardware/drivers/image/wia-ips-blank-pages  
  
\*/ \]   
Show Custom Dialog \[ "Set blank pages" ; $r \]  
Set to scan only front page:

 Set Variable \[ $r ; Value: MBS ( "WIA.SetItemPropertyValue"; "Feeder"; "Document Handling Select"; 32 )\]  
Set page size:

 MBS ( "WIA.SetItemPropertyValue"; "Feeder"; "Page Size"; 0) // A4  
Disable auto cropping:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Auto-Crop"; 0)   
// Values are 0 = Disable, 1 = Single and 2 = Multi  
Set image format to BMP:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}" )  
Set image format to PNG:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}" )  
Set image format to JPEG:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "{B96B3CAE-0728-11D3-9D7B-0000F81EF32E}" )  
Set image format to TIFF:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}" )  
Set image format to PDF:

 MBS ( "WIA.SetItemPropertyValue"; "Flatbed"; "Format"; "{9980BD5B-3463-43C7-BDCA-3CAA146F229F}" )  
// Requires Windows 10 and driver which supports it.  
### See also

- [WIA.DevicePropertyValue](WIADevicePropertyValue.md)
- [WIA.ItemProperties](WIAItemProperties.md)
- [WIA.ItemPropertyValue](WIAItemPropertyValue.md)
- [WIA.ListItems](WIAListItems.md)
- [WIA.Scan](WIAScan.md)
- [WIA.SetDevicePropertyValue](WIASetDevicePropertyValue.md)

### Release notes

- **Version 12.1**
    - Added GUID (or CLSID) as type for [WIA.SetDevicePropertyValue](https://www.mbsplugins.eu/WIASetDevicePropertyValue.shtml) and [WIA.SetItemPropertyValue](https://www.mbsplugins.eu/WIASetItemPropertyValue.shtml) function.
    - Added type parameter for [WIA.SetItemPropertyValue](https://www.mbsplugins.eu/WIASetItemPropertyValue.shtml) function.

### Example Databases

- [DynaPDF/Scan with WIA to PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Scan%20with%20WIA%20to%20PDF.shtml#10ScriptAnchor_)
- [Win Only/Scanning/WIA Scan](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Scanning/WIA%20Scan.shtml#10ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 12.1pr4](https://www.mbsplugins.de/archive/2022-02-22/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.5pr9](https://www.mbsplugins.de/archive/2016-12-05/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 28th November 2016 , last changed 25th February 2026

  
[WIA.SetDevicePropertyValue](WIASetDevicePropertyValue.md) - [WMFP.Create](WMFPCreate.md)

[HTML Version](WIASetItemPropertyValue.shtml)