Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-17-2015, 04:41 AM
electrocad electrocad is offline How to print a line of text with all available fonts in the same document Windows 7 64bit How to print a line of text with all available fonts in the same document Office 2007
Novice
How to print a line of text with all available fonts in the same document
 
Join Date: Oct 2015
Posts: 1
electrocad is on a distinguished road
Default 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
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to print a line of text with all available fonts in the same document Can I manage line spacing when using different fonts? zany Word 3 07-03-2015 05:32 AM
Save Every 2 pages of Word Document as the First Line of Text Faugs Word VBA 6 08-13-2014 11:50 PM
Print copies of onepage document with different text kciejek Word VBA 4 06-03-2014 03:21 AM
How to print a line of text with all available fonts in the same document Print Layout View Differs from Print Preview & Printed Document terik222 Word 3 03-27-2013 02:43 PM
Changing Fonts Within a Document Elementninja111 Word 1 06-21-2012 06:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft