Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

New-OfficeHtmlConversionOptions

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Html.HtmlConversionDocumentOptions

Creates discoverable parsing, trust, and document settings for HTML conversion.

Syntax

New-OfficeHtmlConversionOptions
[-BaseUri <String>]
[-IncludeNormalizedHtml]
[-Profile <Semantic|Document|HighFidelityPrint|PositionedReview>]
[-Trust <Untrusted|Trusted>]
[-UseBodyContentsOnly]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Resolve relative resources from a trusted report directory.

$document = New-OfficeHtmlConversionOptions -BaseUri (Resolve-Path .\Assets) -UseBodyContentsOnly
Export-OfficeHtmlImage -Path .\Report.html -OutputPath .\Report.svg -DocumentOptions $document

Parameters

-BaseUri String optional
Base URI used to resolve relative references.
-IncludeNormalizedHtml SwitchParameter optional
Retain normalized HTML in the conversion document.
-Profile HtmlConversionProfile optional
Built-in conversion profile.
Possible values: Semantic, Document, HighFidelityPrint, PositionedReview
-Trust HtmlInputTrust optional
Input trust level.
Possible values: Untrusted, Trusted
-UseBodyContentsOnly SwitchParameter optional
Convert only body contents.

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.