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

Add-OfficeVisioTextBox

Aliases: VisioText, VisioTextBox
Namespace PSWriteOffice
Aliases
VisioText VisioTextBox
Inputs
OfficeIMO.Visio.VisioPage
Outputs
OfficeIMO.Visio.VisioShape

Adds a text box to the current Visio page.

Remarks

Adds a text box to the current Visio page.

Examples

Authored help example

Add a diagram note.

PS>


OfficeVisio -Path .\Notes.vsdx {
                VisioTextBox -Text 'Generated by PSWriteOffice' -X 1 -Y 1 -Width 3 -Height 0.4
            }
        

Adds a plain text annotation to the active page.

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-OfficeVisioTextBox [-FillColor <String>] [-Height <Double>] [-Key <String>] [-LineColor <String>] [-LineWeight <Double>] [-Name <String>] [-NameU <String>] [-Page <VisioPage>] [-PassThru] -Text <String> [-Unit <Inches|Centimeters|Millimeters>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FillColor String optionalposition: namedpipeline: False
Fill color name or hex value.
Height Double optionalposition: namedpipeline: False
Text box height.
Key String optionalposition: namedpipeline: False
DSL key used by connector commands.
LineColor String optionalposition: namedpipeline: False
Line color name or hex value.
LineWeight Double optionalposition: namedpipeline: False
Line weight.
Name String optionalposition: namedpipeline: False
Optional shape name.
NameU String optionalposition: namedpipeline: False
Optional universal shape name.
Page VisioPage optionalposition: namedpipeline: True (ByValue)
Target page. Optional inside VisioPage or OfficeVisio.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the object created or changed by the command.
Text String requiredposition: 0pipeline: False
Text placed inside the text box.
Unit VisioMeasurementUnit optionalposition: namedpipeline: Falsevalues: 3
Measurement unit for coordinates and dimensions.
Possible values: Inches, Centimeters, Millimeters
Width Double optionalposition: namedpipeline: False
Text box width.
X Double optionalposition: namedpipeline: False
X coordinate of the text box origin.
Y Double optionalposition: namedpipeline: False
Y coordinate of the text box origin.

Outputs

OfficeIMO.Visio.VisioShape