Listing Fonts on the system

  • Thread starter Thread starter kiwibruce
  • Start date Start date
K

kiwibruce

Hi everyone,
Does anybody know if there is a newer way of getting a list of fonts than
this example
EnumerateFonts.zip that Stephen Lebans posted on his website.
http://www.lebans.com/MISC.htm

It works, but I know this dates from Access 97 and I am wondering if there
is a better way to do it in Access 2000/XP?

What I want to do is populate a table with all the fonts the user has on the
system Any ideas would be appreciated

Thanks in advance

Bruce
 
Stephen's code relies on a API call to Windows to get the list of fonts. It
is therefore independent of the version of Access. You are unlikely to find
anything better.
 
Thanks Stephen

That did the trick I had seen that on Dev's site but thought it was the same

A couple of things,

1, For anyone who wants to do this with Access XP (not sure about A2K) you
can now use the built in AddressOf function now (Access now supports it) so
don't need the AddrOf function mentioned on Dev's site as I found that if I
used that piece of code from the CallBack.xls sample then I was getting
messages about missing VBA332.DLL (Office 97 DLL) etc and it was getting
all very messy! Anyway thought people would like to know that

2 The only Issue I now have is the list that is populated is in order of the
Font Install date (I suspect) and not Alpha so I have had to cycle through
the list Write it to a temp table then sort it then reset the row source of
the ListBox to the resulting table. It works, but it seems messy
Does anyone have ideas on a better way to do this?

Thanks again Stephen, as always you are a savour.

Regards
Bruce
Stephen Lebans" <[email protected]>
wrote in message Bruce that
solution was produced to answer a challenge in the NG's and
 
AddressOf is natively available with A2K or higher.

I had forgotten that I had put together a solution to fill a ComboBox
with the currently installed fonts sorted alphabetically. See the code
behind the custom List filling function here:
http://www.lebans.com/htmleditor.htm
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Your awesome Stephen!
I think your credits are in this project more than mine now :-)

Thanks
Bruce
 
Back
Top