Dan Crevier's Blog

In search of a better name...

FaceIds on Office toolbar buttons

When creating custom Office toolbar buttons (aka command bars), you can set the FaceId to some icon. But, where do you figure out what values you can use? I found an article on MSDN that helps out:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno97ta/html/faceid.asp

This has an Excel spreadsheet you can use to view the icons associated with the different IDs. However, you have to lower the default security level in Excel to allow unsigned macros to run. And, you can only look at 200 at a time (there icons up in the 10,000 range!). And, that'll only tell you want icons are available in the version of Office you are running. If you are working on code that will work on other versions of Office, you'll have to run this macro in different versions of Excel and compare. Why isn't there just a table up on MSDN somewhere with the different icons available in different versions of Office? And, it would be even nicer if there was a set of enumerations you could paste in your code so you don't have to hard code numbers everywhere.

Published Friday, April 30, 2004 11:11 PM by dancre

Comments

 

Paul Berkowitz said:

Hi, Dan

I've been using these FaceIDs for some time in Word to make a custom Date button on thestandard toolbar which inserts a custom-formatted date not available in the standard Insert Date... command. I have a macro that displays the first 2720 (I can't recall why I stopped there ;-)) FaceIDs in a Word Table spread over two docs. I saved the docs so I can always refer back to them. It's very true, as you say, that the FaceIDs are appropriate only for the version of Office on which you ran them. My saved tables are still displaying the icons for Word Mac 10 (Word X), many of which are changing in the next version of Word Mac. But I find this rather convenient: what's happened is that my Word Startup template macro which installs the button using FaceID 125 (the Date icon) has automatically updated itself to use the new Date icon in the new version of Word Mac. (The old Date icon went way back to fusty old Word 6 or earlier - maybe Word 5 or 4 - so this new one is a pleasant surprise.) Personally, I think that's better than if this new Date icon had been given a new FaceID which I'd have to search for up in the 10,000s. As long as you save your Excel doc (like my Word table) for each version, you can still refer back to the old icons although they will no longer display via FaceID in a newer version - instead you get the current icon, which surely is better. i agree with you that it would be nice to have the whole panoply up somewhere on MSDN to review, and - in principle - enumerations would be nice - but 10,000 of them?

Anyway, don't you find this a little more versatile than the many-layered process for extracting and using icons from, say, MS Entourage in Office Mac, whereby you have to extract the icons from Microsoft Framework (again, different for each version) and use two different, pecialized, hard-to-find 3rd-party applications to extract and convert the icons into graphic formats? (And who was responsible for this, undocumented, location and access - may I ask? ;-)) That's what I'm doing with an AppleScript/Cocoa add-in app I'm building for Entourage. It works fine (I end up with TIFF files Cocoa likes for images, extracted as icons by Iconographer and converted to TIFF by GraphicConverter using the clipboard) but it sure wasn't easy to figure out how to do it.
May 2, 2004 9:39 AM
 

Dan Crevier said:

The difference with Microsoft Entourage is that it doesn't provide a platform for using those icons. If it did, then you could argue that it should provide an easy way to find them. As it is, I'm not sure it's even legal to grab icons out of Entourage and redistribute them in another app.

Office does a file with all the faceids defined (internally called tcid's). I'd actually forgotten that I can use it to search for the ids by name. But, that doesn't help anyone without the office source :-) And yes, it is a huge file.
May 2, 2004 8:56 PM
 

Dan Crevier s Blog FaceIds on Office toolbar buttons | bar stools said:

June 14, 2009 1:30 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker