Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: list fonts Excel
;Enumerate Fonts in Excel oApplication = ObjectOpen("Excel.Application") ; add a blank workbook... oWorkbook = oApplication.workbooks oWorkbook.add oApplication.Visible = @TRUE ; Chnage to @False to hide oApplication.UserControl = @FALSE oApplication.DisplayAlerts = @FALSE oApplication.ScreenUpdating = @FALSE oCmdcollection = oApplication.CommandBars oCmdbar = oCmdcollection.Item("Formatting") oCtrlcollection = oCmdbar.Controls oFontsCombobox = oCtrlcollection.Item(1);Grabs the Font Control ;message("oFontsCombobox caption",oFontsCombobox.Caption) ;oFontsCombobox.Enabled = @True ;message("oFontsCombobox Enabled",oFontsCombobox.Enabled) fontlist ="" cnt = oFontsCombobox.ListCount For i = 0 To cnt - 1 font= oFontsCombobox.List(i + 1) fontlist = StrCat(fontlist,@tab,font) Next fontlist = StrTrim(fontlist) AskItemList("List of Fonts in Excel",fontlist,@tab,@Unsorted,@Single) oApplication.Quit ObjectClose(oFontsCombobox) ObjectClose(oCtrlcollection) ObjectClose(oCmdbar) ObjectClose(oCmdcollection) ObjectClose(oWorkbook) ObjectClose(oApplication)
Article ID: W15252
File Created: 2002:09:05:13:50:50
Last Updated: 2002:09:05:13:50:50