OfficeIMO

API Reference

Command

Get-OfficeWord

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Opens an existing Word document.

Remarks

Opens an existing Word document.

Examples

Load a document in read-only mode.


PS>$doc = Get-OfficeWord -Path .\Report.docx -ReadOnly
        

Loads Report.docx and exposes the document object for querying.

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

Get-OfficeWord [-AutoSave] -InputPath <String> [-ReadOnly] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoSave SwitchParameter optionalposition: namedpipeline: False
Enable AutoSave when editing.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Path to the .docx. Accepts PS paths.
ReadOnly SwitchParameter optionalposition: namedpipeline: False
Open in read-only mode.

Outputs

System.Object