Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficeWordImage

Aliases: WordImageStyle
Module PSWriteOffice
Aliases
WordImageStyle
Inputs
OfficeIMO.Word.WordImage
Outputs
OfficeIMO.Word.WordImage

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

Syntax

Set-OfficeWordImage [-CropBottom <Int32>] [-CropLeft <Int32>] [-CropRight <Int32>] [-CropTop <Int32>] [-Description <String>] [-Height <Double>] [-Hidden <Boolean>] [-HorizontalFlip <Boolean>] [-Image] <WordImage> [-Opacity <Int32>] [-PassThru] [-Rotation <Int32>] [-Title <String>] [-VerticalFlip <Boolean>] [-Width <Double>] [-Wrap <WordImageTextWrapping>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Resize and describe all report images.

$doc = Get-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 Double optional
Image height in points.
-Hidden Boolean optional
Whether the image is hidden.
-HorizontalFlip Boolean 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 Boolean optional
Vertically flip the image.
-Width Double optional
Image width in points.
-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.