{"id":999,"date":"2007-04-19T16:02:17","date_gmt":"2007-04-19T16:02:17","guid":{"rendered":""},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T04:00:00","slug":"view-all-your-fonts-in-word","status":"publish","type":"post","link":"https:\/\/don.oninohana.com\/blog2\/2007\/04\/view-all-your-fonts-in-word\/","title":{"rendered":"View all Your  Fonts in Word"},"content":{"rendered":"<p>Did you ever want to see all the fonts that you have installed displayed in Word with some sample text? No, well I did and I didn&#8217;t feel like doing it manually. I&#8217;m sure there is some font program that already does this, but wanted to be able to run a simple macro each time rather than having to install something.<\/p>\n<p>Anyway, after an hour or so, I came up with the following:<\/p>\n<p>[code]<br \/>\nDim allfonts(400) As String<br \/>\nDim thefont As String<\/p>\n<p>Set fontlist = Application.CommandBars(&#8220;Formatting&#8221;).FindControl(ID:=1728)<\/p>\n<p>&#8216;   If Font control is missing, create a temp CommandBar<br \/>\nIf fontlist Is Nothing Then<br \/>\n    Set TempBar = Application.CommandBars.Add<br \/>\n    Set fontlist = TempBar.Controls.Add(ID:=1728)<br \/>\nEnd If<\/p>\n<p>For i = 0 To fontlist.ListCount &#8211; 1<br \/>\n    thefont = fontlist.List(i + 1)<br \/>\n    &#8216;Selection.TypeText Text:=thefont &#038; vbNewLine<br \/>\n    allfonts(i) = thefont<br \/>\nNext i<\/p>\n<p>&#8216;   Delete temp CommandBar if it exists<br \/>\nOn Error Resume Next<br \/>\nTempBar.Delete<\/p>\n<p>For y = 1 To UBound(allfonts)<\/p>\n<p>Selection.Font.Name = &#8220;Arial&#8221;<br \/>\nSelection.TypeText Text:=allfonts(y) &#038; vbNewLine<br \/>\n&#8216; If youre going to type in Japanese, use this<br \/>\nApplication.Keyboard (1041)<br \/>\nSelection.Font.Name = allfonts(y)<br \/>\nSelection.TypeText Text:=&#8221;The quick brown fox did his thing&#8221;<\/p>\n<p>Selection.EndKey Unit:=wdLine<br \/>\nSelection.HomeKey Unit:=wdLine, Extend:=wdExtend<\/p>\n<p>&#8216;Selection.Font.Name = allfonts(y)<br \/>\n&#8216;Selection.TypeParagraph<br \/>\nSelection.EndKey Unit:=wdLine<br \/>\nSelection.TypeText Text:=vbNewLine &#038; vbNewLine<\/p>\n<p>Next y<br \/>\n[\/code]<\/p>\n<p>Seems to work pretty well.<\/p>\n<p>[b]Edit:[\/b] My real imepetus for doing this was to view all the Japanese fonts that I have installed with something typed in Japanese and styled with the appropriate font. My lovely and smart wife pointed out that you can go to your fonts folder and click on any of the installed fonts to see what the font looks like.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever want to see all the fonts that you have installed displayed in Word with some sample text? No, well I did and I didn&#8217;t feel like doing it manually. I&#8217;m sure there is some font program that &hellip; <a href=\"https:\/\/don.oninohana.com\/blog2\/2007\/04\/view-all-your-fonts-in-word\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-999","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/posts\/999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/comments?post=999"}],"version-history":[{"count":0,"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/posts\/999\/revisions"}],"wp:attachment":[{"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/media?parent=999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/categories?post=999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/don.oninohana.com\/blog2\/wp-json\/wp\/v2\/tags?post=999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}