Thread: Word Ribbon Creation
2012-05-28, 09: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?
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!
2012-05-28, 16:14 #2
- Join Date
- Jan 2001
- Madison, Wisconsin, Wisconsin, USA
- Thanked 63 Times in 61 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 19:13.Charles Kyle Kenyon