You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.
Issue : in Powershell 7 the document is created but content is not added
Expected result : the document is created and added text is present
Actual result : the document is created but remains empty
reproduction steps : see sequence below
PS>$wd = New-WordDocument -FilePath c:\temp\repro.docx
PS>Add-WordText -WordDocument $wd -Text "This is the title" -HeadingType Heading1
ParentContainer : None
ListItemType : Bulleted
Pictures : {}
Hyperlinks : {}
StyleName : Heading1
DocumentProperties : {}
Direction : LeftToRight
IndentationFirstLine : 0
IndentationHanging : 0
IndentationBefore : 0
IndentationAfter : 0
Alignment : left
Text : This is the title
MagicText : {Xceed.Document.NET.FormattedText}
FollowingTable :
LineSpacing : 12
LineSpacingBefore : 0
LineSpacingAfter : 0
ParagraphNumberProperties :
IsListItem : False
IndentLevel :
IsKeepWithNext : False
Xml : <w:p
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:pPr>
<w:pStyle w:val="Heading1" />
<w:ind />
</w:pPr>
<w:r>
<w:t>This is the title</w:t>
</w:r>
</w:p>
PackagePart : System.IO.Packaging.ZipPackagePart
PS>Save-WordDocument $wd
The document is created c:\temp\repro.docx
PS>ii C:\temp\repro.docx
--> repro.docx is present but empty
REMARK : from powershell_ise it worked well, and prom powershell version 5 too
configuration : windows 11 home edition 21H2 (OS Build 22000.526)
PROCESSOR_ARCHITECTURE AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
PS >$PSVersionTable
Name Value
PSVersion 7.2.1
PSEdition Core
GitCommitId 7.2.1
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS >get-module pswriteword # installed in current user scope
ModuleType Version PreRelease Name
Script 1.1.14 PSWriteWord
repro.docx
The text was updated successfully, but these errors were encountered: