Some time ago, someone assited me in printing all system fonts to a Word document :-
$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
It worked OK then, but now only prints the first 25 fonts and stops.
Any ideas why?
COM Objects were introduced by Microsoft back in 1993. I believe what Don is say is that is an older "technology" that was made for Operating systems 24 years ago, so it might not work as it was intended back in 1993.
I'm not aware of another way to connect to Office products like Word other than a COM Object.
It appears that when you use a font from the collection, it changes the position of the font in the list. I only got 5 when I ran it. So, you need to create a static list and loop through it. This worked for me with a fixed label font for the oddball fonts.