Results 1 to 2 of 2
Thread: Word Ribbon Creation
2012-05-28, 10:15 #1
- Join Date
- Feb 2001
- Thanked 1 Time in 1 Post
Word Ribbon Creation
I am trying to create a ribbon using Gunter Avenius' Ribbon Creator. http://www.ribboncreator2010.de/en/
Figuring how to create a ribbon with supplied or custom icons has been quite straightforward. The issue is with linking the buttons created to macros.
How is demonstrated at http://www.ribboncreator2010.de/Vide...N_RunCode.html and the code below should run the required macro.
Public Sub OnActionButton(control As IRibbonControl)
'Callback in XML File "onAction"
' Callback for event button click
' Callback für Button Click
Select Case control.id
MsgBox "Button """ & control.id & """ clicked" & vbCrLf & _
"Es wurde auf Button """ & control.id & """ in Ribbon geklickt", _
The problem I am having is that in the line I have highlighted in red, as soon as I save or even move the cursor away from the end, the parenthesis are stripped by the VB editor. That in turn stops the code working.
This tool looks to be a terrific way of creating a ribbon but unless it also functions it is of no use.
Any ideas what is wrong here or suggestions for a similar tool please?
2012-05-28, 17:14 #2
- Join Date
- Jan 2001
- Madison, Wisconsin, Wisconsin, USA
- Thanked 66 Times in 64 Posts
I've never used Ribbon Creatorl. I have used the Custom UI Editor for Microsoft Office. Instructions for its use and a download link can be found at Customize the Ribbon (It doesn't take rocket science).
I haven't used Call. Do you need parameters included between the parentheses? Would this simply be written as DisplayCoverDetails instead of Call DisplayCoverDetails? It appears you are trying to initiate a separate subroutine here. When you do that without parameters, you do not include parentheses. When you do it with parameters or passed variables, you do it with parentheses.
Sorry, I a duffer at vba. I know enough to get some things done and be dangerous. Hope this helps anyway.
Ribbon Creator looks interesting. I intend to look into it more.
Last edited by Charles Kenyon; 2012-05-28 at 20:13.Charles Kyle Kenyon