API Reference

Cmdlet

Add-OfficeWordTextBox

Aliases: WordTextBox
Namespace PSWriteOffice
Aliases
WordTextBox
Inputs
None
Outputs
OfficeIMO.Word.WordTextBox

Adds an OfficeIMO Word text box to the current Word DSL location.

Remarks

Adds an OfficeIMO Word text box to the current Word DSL location.

Examples

Authored help example

Add a positioned report callout.

PS>


New-OfficeWord -Path .\Report.docx {
                WordTextBox -Text 'Executive summary' -WidthCentimeters 7 -HeightCentimeters 2 -HorizontalOffsetCentimeters 1.5 -VerticalOffsetCentimeters 1 -AutoFitToTextSize
            }
        

Creates a native OfficeIMO Word text box and applies sizing/positioning through OfficeIMO's text-box API.

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-OfficeWordTextBox [-AutoFit <Nullable`1>] [-AutoFitToTextSize] [-HeightCentimeters <Nullable`1>] [-HorizontalAlignment <Nullable`1>] [-HorizontalOffsetCentimeters <Nullable`1>] [-HorizontalPositionRelativeFrom <Nullable`1>] [-PassThru] -Text <String> [-VerticalOffsetCentimeters <Nullable`1>] [-VerticalPositionRelativeFrom <Nullable`1>] [-WidthCentimeters <Nullable`1>] [-WrapText <InLineWithText>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoFit Nullable`1 optionalposition: namedpipeline: False
Explicit OfficeIMO text-box autofit mode.
AutoFitToTextSize SwitchParameter optionalposition: namedpipeline: False
Resize the text box to fit its text.
HeightCentimeters Nullable`1 optionalposition: namedpipeline: False
Height in centimeters.
HorizontalAlignment Nullable`1 optionalposition: namedpipeline: False
Horizontal alignment for anchored text boxes.
HorizontalOffsetCentimeters Nullable`1 optionalposition: namedpipeline: False
Horizontal offset in centimeters.
HorizontalPositionRelativeFrom Nullable`1 optionalposition: namedpipeline: False
Horizontal relative position anchor.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the created text box.
Text String requiredposition: 0pipeline: False
Text to place inside the text box.
VerticalOffsetCentimeters Nullable`1 optionalposition: namedpipeline: False
Vertical offset in centimeters.
VerticalPositionRelativeFrom Nullable`1 optionalposition: namedpipeline: False
Vertical relative position anchor.
WidthCentimeters Nullable`1 optionalposition: namedpipeline: False
Width in centimeters.
WrapText WrapTextImage optionalposition: namedpipeline: Falsevalues: 7
Word text wrapping mode.
Possible values: InLineWithText, Square, Tight, Through, TopAndBottom, BehindText, InFrontOfText

Outputs

OfficeIMO.Word.WordTextBox