MS Word Command Button ID numbers

Posted on 2003-03-29
Medium Priority
Last Modified: 2008-02-26

I am attempting to programatically add a button to a toolbar in MS Word.

It is a bit of a nightmare trying to find the ID numbers that relate to the built in buttons.

CommandBars("Print Procedures").Controls.Add(Type:=msoControlButton, ID:="4")

This adds the print button to my custom toolbar "Print Procedures".  (ID:=4 is the print button)

I found a list of button ID numbers for MS Excel...


...and buttons common to both Excel and Word seem to have the same number.

The number I am looking for however is for the button which opens the document map and therefore not on the this Excel list.

If anyone knows how to generate this list in VBA, or knows of where a web based list is, or some way in Word to find the ID for each button manually, I would be eternally grateful.

I thank you in advance.
Iain Clark
Question by:IainTheVBALearner
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 44

Accepted Solution

bruintje earned 100 total points
ID: 8232695
Hello IainTheVBALearner,

you could try


Author Comment

ID: 8233300
Hello Bruintje

Thats perfect!  Just what I was looking for.

Thank you so much.
LVL 44

Expert Comment

ID: 8233400
:) Glad i could help and thanks for the grade

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
Curious about the latest ransomware attack? Check out our timeline of events surrounding the spread of this new virus along with tips on how to mitigate the damage.
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question