API Reference
Command
Get-OfficeWord
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 SetsParameters
- AutoSave SwitchParameter
- Enable AutoSave when editing.
- InputPath String
- Path to the .docx. Accepts PS paths.
- ReadOnly SwitchParameter
- Open in read-only mode.
Outputs
System.Object