binside

Aufzählungszeichen (Bullets) per PowerShell in ein Word-Dokument einfügen

Ich erstelle Word-Dokumente mit Hilfe von PowerShell.

In einem Word-Dokument sollen auch Aufzählungszeichen (Bullets) eingefügt werden. Kann mir jemand sagen, wie ich diese einfüge? Ich verwende Microsoft Word 2007 und PowerShell v2.0.

Eventuell kennt auch jemand eine Seite, in der weitere Wort-Formatierungen per PowerShell beschrieben sind?

$Word = New-object -comobject Word.Application
$Word.Caption = "Test"  
$Word.Visble = $True

$Dokument = $Word.Documents.Add()
$Eingabe = $Word.Selection
$Eingabe.Font.Size = "16"  
$Eingabe.ParagraphFormat.Alignment = 1
$Eingabe.Font.Bold = $True
$Eingabe.TypeText("Überschrift")  
$Eingabe.Font.Bold = $False
$Eingabe.TypeParagraph()

$Eingabe.ParagraphFormat.Alignment = 0

#Hier 3 Aufzählungszeichen einfügen.

$Dokument.SaveAs("C:\Script\Test.doc")  
$Dokument.Close()
$Word.Quit()


Grüße

B_out
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 173028

Url: https://administrator.de/forum/aufzaehlungszeichen-bullets-per-powershell-in-ein-word-dokument-einfuegen-173028.html

Ausgedruckt am: 12.05.2025 um 07:05 Uhr