Cmdlet
Add-OfficeWordTextBox
Adds an OfficeIMO Word text box to the current Word DSL location.
Syntax
Add-OfficeWordTextBox
[-AutoFit <NoAutoFit| ShrinkTextOnOverflow| ResizeShapeToFitText>]
[-AutoFitToTextSize]
[-Height <OfficeLength>]
[-HorizontalAlignment <Left| Center| Right| Outside| Inside>]
[-HorizontalPositionRelativeFrom <WordHorizontalRelativePosition>]
[-PassThru]
[-Text] <String>
[-VerticalPositionRelativeFrom <WordVerticalRelativePosition>]
[-Width <OfficeLength>]
[-Wrap <WordImageTextWrapping>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Add a positioned report callout.
New-OfficeWord -Path .\Report.docx {
WordTextBox -Text 'Executive summary' -Width 7cm -Height 2cm -X 1.5cm -Y 1cm -AutoFitToTextSize
}Creates a native OfficeIMO Word text box and applies sizing/positioning through OfficeIMO's text-box API.
Parameters
- -AutoFit WordTextBoxAutoFitType
- Explicit OfficeIMO text-box autofit mode.
- Possible values:
NoAutoFit,ShrinkTextOnOverflow,ResizeShapeToFitText - -AutoFitToTextSize SwitchParameter
- Resize the text box to fit its text.
- -Height OfficeLength
- Height; numbers mean points and unit suffixes are accepted.
- -HorizontalAlignment WordTextBoxHorizontalAlignment
- Horizontal alignment for anchored text boxes.
- Possible values:
Left,Center,Right,Outside,Inside - -HorizontalPositionRelativeFrom WordHorizontalRelativePosition
- Horizontal relative position anchor.
- Possible values:
Margin,Page,Column,Character,LeftMargin,RightMargin,InsideMargin,OutsideMargin - -PassThru SwitchParameter
- Emit the created text box.
- -Text String
- Text to place inside the text box.
- -VerticalPositionRelativeFrom WordVerticalRelativePosition
- Vertical relative position anchor.
- Possible values:
Margin,Page,Paragraph,Line,TopMargin,BottomMargin,InsideMargin,OutsideMargin - -Width OfficeLength
- Width; numbers mean points and unit suffixes are accepted.
- -Wrap WordImageTextWrapping
- Word text wrapping mode.
- Possible values:
InLineWithText,Square,Tight,Through,TopAndBottom,BehindText,InFrontOfText - -X OfficeLength
- Horizontal offset; numbers mean points and unit suffixes are accepted.
- -Y OfficeLength
- Vertical offset; numbers mean points and unit suffixes are accepted.
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.