How to print a line of text with all available fonts in the same document
Hello Word People,
First Post!.
Some kind soul over at the Powershell.com site suggested that I use this code :-
$word = New-Object -ComObject "Word.Application"
$word.Visible = $true
$document = $word.Documents.Add()
foreach ($name in $word.FontNames ) {
$p = $document.Paragraphs.Add();
$p.Range.Text = $name
$p.Range.Font.Name = $name
$p.Range.InsertParagraphAfter();
}
I have no idea how to use this code, could someone help me please.
Thanks
electrocad
|