Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Open-OfficeEpub

Module
PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Epub.EpubPublication System.IO.FileInfo

Opens an EPUB publication, optionally saving an editing block atomically.

Syntax

Open-OfficeEpub
[-AllowLoss]
[[-Content] <ScriptBlock>]
[-PassThru]
[-Path] <String>
[-Show]
[<CommonParameters>]
#
Parameter set: Path
Open-OfficeEpub
[-AllowLoss]
[[-Content] <ScriptBlock>]
-LiteralPath <String>
[-PassThru]
[-Show]
[<CommonParameters>]
#
Parameter set: LiteralPath

Examples

Open a publication from a literal file pipeline.

$book = Get-Item -LiteralPath './Guide[final].epub' | Open-OfficeEpub

Append a chapter and save only when the block succeeds.

Open-OfficeEpub -Path ./Guide.epub { EpubChapter -Title Review -Text 'Reviewed and approved.' }

Parameters

-AllowLoss SwitchParameter optional
Gets or sets whether native-save loss is explicitly accepted.
-Content ScriptBlock optionalposition: 1
Gets or sets a content block; omission returns the live document.
-PassThru SwitchParameter optional
Gets or sets whether a completed content block returns the saved FileInfo.
-Path String requiredposition: 0pipeline: True (ByValue)sets: Path
EPUB source with FileSystem wildcard expansion.
-Show SwitchParameter optional
Gets or sets whether the saved file opens in the system default application.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal EPUB source, including FileInfo.FullName and provider PSPath.

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.