Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Export-OfficeWordImage

Namespace PSWriteOffice
Inputs
OfficeIMO.Word.WordDocument
Outputs
OfficeIMO.Drawing.OfficeImageExportResult

Exports one or more Word pages through the format-neutral OfficeIMO image pipeline.

Remarks

Exports one or more Word pages through the format-neutral OfficeIMO image pipeline.

Examples

Authored help example

Export the first page as SVG.

PS>


Export-OfficeWordImage -Path .\Report.docx -OutputPath .\Report.svg -Format Svg
        

Writes the image quietly. Add -PassThru to receive the structured export result.

Export every page as JPEG files.

PS>


Export-OfficeWordImage -Path .\Report.docx -OutputPath .\Pages -Format Jpeg -AllPages
        

For a bounded batch, create options with New-OfficeWordImageOptions -PageIndex 0 -PageCount 2.

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.

Syntax

Export-OfficeWordImage [-AllPages] [-Format <Png|Svg|Jpeg|Tiff|Webp>] [-Options <WordImageExportOptions>] -OutputPath <String> [-PassThru] -Path <String> [<CommonParameters>]
#
Parameter set: Path

Parameters

AllPages SwitchParameter optionalposition: namedpipeline: False
Export every estimated page to the destination folder.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
Options WordImageExportOptions optionalposition: namedpipeline: False
Optional page, size, scale, theme, and rendering settings.
OutputPath String requiredposition: 1pipeline: False
Destination image file, or destination folder when -AllPages or Options.PageCount requests a batch.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the structured image export result.
Path String requiredposition: 0pipeline: False
Path to the Word document.

Outputs

OfficeIMO.Drawing.OfficeImageExportResult

Export-OfficeWordImage [-AllPages] -Document <WordDocument> [-Format <Png|Svg|Jpeg|Tiff|Webp>] [-Options <WordImageExportOptions>] -OutputPath <String> [-PassThru] [<CommonParameters>]
#
Parameter set: Document

Parameters

AllPages SwitchParameter optionalposition: namedpipeline: False
Export every estimated page to the destination folder.
Document WordDocument requiredposition: namedpipeline: True (ByValue)
Open Word document instance.
Format OfficeImageExportFormat optionalposition: namedpipeline: Falsevalues: 5
Output image format.
Possible values: Png, Svg, Jpeg, Tiff, Webp
Options WordImageExportOptions optionalposition: namedpipeline: False
Optional page, size, scale, theme, and rendering settings.
OutputPath String requiredposition: 1pipeline: False
Destination image file, or destination folder when -AllPages or Options.PageCount requests a batch.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the structured image export result.

Outputs

OfficeIMO.Drawing.OfficeImageExportResult