Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficeWordTableCondition

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Attaches conditional formatting logic to the current table.

Remarks

Evaluates each data row via -FilterScript ($_ holds the original object) and optionally changes the table style or row shading.

Examples

Authored help example

Shade rows above threshold.

PS>


WordTableCondition -FilterScript { $_.Qty -gt 10 } -BackgroundColor '#fff4d6'
        

Applies a light highlight when the quantity column exceeds 10.

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

Add-OfficeWordTableCondition [-BackgroundColor <String>] -FilterScript <ScriptBlock> [-TableStyle <Nullable`1>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BackgroundColor String optionalposition: namedpipeline: False
Row highlight color applied when the predicate matches (ARGB hex).
FilterScript ScriptBlock requiredposition: namedpipeline: False
Predicate executed per data row (uses $_).
TableStyle Nullable`1 optionalposition: namedpipeline: False
Optional table style applied when the predicate matches.

Outputs

System.Object