Insert CUSTOM icons onto a commandbar programmatically using VBA

M

Matt Cope

i'm struggling to find a way of inserting my own custom
icons onto my own Word toolbar using VBA. i understand
how to use the FaceID property to add an icon from the
hundreds that office provide, but have not been able to
add my own.

i already have created the toolbar in the Word template,
but would like to write some code that checks for the
toolbar on document open. if it cannot be found then it
recreates it using VBA. this is no problem except for the
custom icons.

i have a couple of ideas on achieving this but am not too
sure how to make them work or even if they are possible in
the first place.
1. add my icons to the the ones included in office and
return their IDs. then use the FaceID property to set my
control icons.
2. create another toolbar that's perhaps invisible to the
user and only contains my custom icons. then use this to
copy and paste the icons using the copyface/pasteface
methods.

any knowledge in this subject greatly appreciated, or
pointers as to the possibility of what i want to achieve

cheers
matt
 
W

Word Heretic

G'day "Matt Cope" <[email protected]>,

The easiest way to do this is to have a toolbar that you never show
that has your faces on it.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Matt Cope reckoned:
 
M

Matt Cope

-----Original Message-----
G'day "Matt Cope" <[email protected]>,

The easiest way to do this is to have a toolbar that you never show
that has your faces on it.


Steve Hudson - Word Heretic


cheers steve,, that was the solution that i was leaning
too but didn't know if there was any other way around it.

matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top