Skip to content

Commit 58cf37e

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: OpenXML.Word.File.get_Document ( Fixes #44 )
Propagating part
1 parent 0ef41ad commit 58cf37e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

OpenXML.types.ps1xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ foreach ($wordTable in
445445
.DESCRIPTION
446446
Gets the `/word/document.xml` within a Word File.
447447
#>
448+
[OutputType([xml])]
449+
param()
450+
448451
if ($null -ne $this.'#document') { return $this.'#document'}
449452

450453
if (-not $this.PartExists) { return }
@@ -472,6 +475,9 @@ if ($documentXml) {
472475
$documentXml.psobject.properties.add(
473476
[psnoteproperty]::new('OpenXML', $this), $false
474477
)
478+
$documentXml.psobject.properties.add(
479+
[psnoteproperty]::new('Part', $documentPart), $false
480+
)
475481
$this.psobject.properties.add(
476482
[psnoteproperty]::new('#document', $documentXml), $false
477483
)

0 commit comments

Comments
 (0)