Hi zilpher
I had a couple problems, everything was going good. I
modified the code a little ( I’m very new at this) to the best of my ability. Then I opened my .docm from ui editor, then entered this code below
Code:
[FONT=Calibri][SIZE=3]<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">[/SIZE][/FONT]
[SIZE=3][FONT=Calibri] <ribbon>[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <tabs>[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <tab id="ItsAllMine" label="Home Inspection Toolbar" insertAfterMso="TabHome">[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <group id="customGroup" label="Home Inspection Tool Group">[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <button id="customButton1" label="Red Circle" size="large" onAction="RunHome" image="Red Circle" />[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <button id="customButton2" label="Red Arrow" size="large" onAction="RunHome" image="Red Arrow 1" />[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <button id="customButton3" label="Add Protection" size="large" onAction="RunHome" image="Add Protection" />[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <button id="customButton4" label="Remove Protection" size="large" onAction="RunHome" image="Unlock Protection" />[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] <button id="customButton5" label="Insert Picture" size="large" onAction="RunHome" image="Insert Photos" />[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] </group>[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] </tab>[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] </tabs>[/FONT][/SIZE]
[SIZE=3][FONT=Calibri] </ribbon>[/FONT][/SIZE]
[FONT=Calibri][SIZE=3]</customUI>[/SIZE][/FONT]
I then hit the validate button to confirm the XML is ok. So far so good. I then had to save before inserting icons, again that went good, all inseted Icons were seen to the top right. I then pressed save again. Then Hit the Generate Callbacks button and copied the code to notepad.
Code:
[FONT=Calibri][SIZE=3]'Callback for customButton1 onAction[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Sub RunHome(control as IRibbonControl)[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]MsgBox "Hello There”[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]End Sub[/SIZE][/FONT]
I opened my docm and noticed that upon opening that a new tool ribbon was present in line with other ribbons. I opened Vb and added a module to this docm and pasted the callback as instructed. Before closing I noticed the tool ribbon was there and the message was visible when icon was pressed. I closed and saved, but when I re-opened docm all was lost. I went back to the UI Editor all info was gone. the callback was still attached to docm. but that was it. I hope I was able to explain in a way you could understand. I tried it a few times and it did the same thing each time......
Also How do I attached Recored macros and other commands to Ribbon. are the added to callback..