# Set-OfficeWordImage

Updates OfficeIMO Word image sizing, wrapping, crop, and metadata.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Word.WordImage`

**Outputs**

`OfficeIMO.Word.WordImage`

**Source**

[SetOfficeWordImageCommand.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Word/SetOfficeWordImageCommand.cs#L21) 

Updates OfficeIMO Word image sizing, wrapping, crop, and metadata.

## Syntax

```
Set-OfficeWordImage
[-CropBottom <Int32>]
[-CropLeft <Int32>]
[-CropRight <Int32>]
[-CropTop <Int32>]
[-Description <String>]
[-Height <OfficeLength>]
[-Hidden]
[-HorizontalFlip]
[-Image] <WordImage>
[-Opacity <Int32>]
[-PassThru]
[-Rotation <Int32>]
[-Title <String>]
[-VerticalFlip]
[-Width <OfficeLength>]
[-Wrap <WordImageTextWrapping>]
[<CommonParameters>]
```

[#](#method-set-officewordimage-int32-int32-int32-int32-string-officelength-switchparameter-switchparameter-wordimage-int32-switchparameter-int32-string-switchparameter-officelength-wordimagetextwrapping)

Parameter set: `Default`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Update Existing Word Documents](/docs/pswriteoffice/word-update-existing/) Guide
  
  Replace content and modify targeted Word structures while preserving the rest of an existing DOCX document.

## Examples

### Resize and describe all report images.

```powershell
$doc = Open-OfficeWord -Path .\Report.docx
$doc |
    Get-OfficeWordImage |
    Set-OfficeWordImage -Width 320 -Wrap Square -Title 'Report image' -Description 'Image used in the report'
$doc | Save-OfficeWord -Path .\Report-Images.docx
```

Gets OfficeIMO image objects from an open document, applies thin image metadata and layout updates, and saves the document.

## Parameters

**-CropBottom Int32 optional**

Bottom crop value.

**-CropLeft Int32 optional**

Left crop value.

**-CropRight Int32 optional**

Right crop value.

**-CropTop Int32 optional**

Top crop value.

**-Description String optional**

Image alternate text metadata.

**-Height OfficeLength optional**

Image height; numbers mean points and unit suffixes are accepted.

**-Hidden SwitchParameter optional**

Whether the image is hidden.

**-HorizontalFlip SwitchParameter optional**

Horizontally flip the image.

**-Image WordImage requiredposition: 0pipeline: True (ByValue)**

Image to update.

**-Opacity Int32 optional**

Fixed opacity percentage.

**-PassThru SwitchParameter optional**

Emit the updated image.

**-Rotation Int32 optional**

Image rotation in degrees.

**-Title String optional**

Image title metadata.

**-VerticalFlip SwitchParameter optional**

Vertically flip the image.

**-Width OfficeLength optional**

Image width; numbers mean points and unit suffixes are accepted.

**-Wrap WordImageTextWrapping optional**

Text wrapping mode.

Possible values: `InLineWithText`, `Square`, `Tight`, `Through`, `TopAndBottom`, `BehindText`, `InFrontOfText`

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:9A62B8C873F9A40AEAB358A60901907AF9020164B007AC0D24525DC68B1AD033 -->
