binside
Goto Top

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

Content-Key: 173028

Url: https://administrator.de/contentid/173028

Ausgedruckt am: 28.03.2024 um 22:03 Uhr