Editing Word 2003 template with custom toolbar in Word 2007 - vba

I only have Word 2007 and a Word 2003 template (.dot file).
When I open it, I can see it has macro's in it, stored in modules. I can also see that the template adds buttons to the add-ins tab in the ribbon.
How can I modify these buttons? Like the text or which macro each button triggers?
As a test I deleted all macros in the template, saved it, restared it, and it still gave me custom buttons in the Add-in tab. Of course if I press those buttons, it gives me error that the macro is not there. Which is fune. Then, if I view the template's code (Alt-F11), there is really no code at all. Also no Add-in is loaded (as seen in the Word options > Add ins window). So how does the Word 2003 template know which buttons to load? Where is the custom toolbar info stored in the Word 2003 template?

i am not sure i fully understood your question. Yet, here are a few elements.
Modify the buttons generated by a macro
You have to change the vba code. See :
this link for Word 2003 : http://www.ozgrid.com/VBA/custom-menus.htm
this link for Word 2007+ : http://www.rondebruin.nl/ribbon.htm
Buttons already loaded
If your custom buttons still appear after you deleted the code :
i'd think that you missed some part of the code to delete, can you re-check ? in every module of the doc
are you sure you didn't save a doc instead of saving the template ?
If these tips doesn't answer your question, please give us some more info on your problem or if possible, give us the template you are using.
Regards,
Max

Related

Microsoft Word - How to add a button to insert file

I want to add a button in microsoft word that when I click it opens microsoft explorer to insert a file in the word page.
I already have the button but dont know what action should i do to implement that.
Any help?
You could, instead of adding a Button in your document, add the Insert File command to the QAT for that document.
This is a bit more subtle but works in non-macro enabled documents. In my opinion it is much easier to do.
You would want to draw your user's attention to it. Many places will not allow macros to run. It may run on Macs, which will not work with your ActiveX button. Here is my webpage on Modifying the QAT.

Make a ribbon button reference the macro in a new workbook instance rather than in the source template

I have a macro-enabled Excel template which contains a ribbon button pointing to a macro sub. The button assignment still points to the source template, however, instead of the sub in the new document. If I create a document and then move or delete the template, I'm no longer able to use the button in the new document:
I've noticed that the ribbon button seems have the macro's source template path hard-coded, and there isn't any place I can find in ribbon customization UI to change it:
I'm certain this has been asked before, but I've tried a number of different ways of searching for it without coming up with anything.
I found this which talks about a button on a form, not a ribbon, and I found this which seems to be generating "shapes" programmatically and assigning their action; neither of these two are relevant.
This is the closest I've found, but whereas the QAT customization tab has the option for setting the target:
the ribbon customization tab does not have that. Any help would be greatly appreciated.

How to put a button into Quick Access Toolbar in MS Word 2010 with a macro (VBA)?

I import bsa file as module. And macro run properly. I need to set up these macros buttons in to Quick Access Toolbar (QAT). I do it manually from standart way as well. But i want to make this automatically with macro (VBA). How these macros assigned to the buttons and buttons set up on the QAT by VBA inside macro?
I searched a lot, and the only way I was able to find was using Office Fluent User Interface.
See this article that walks you through doing it. The example is Excel's QAT, but since all Office Products share the same Type Library, you should be able to adapt it for MS Word 2010.

Can I base a word template on another template

For the purposes of branding, our Word normal.dot template is updated via the login script. This pains me terribly, because I have a number of very useful VBA macros that I want to have access to. Specifically, I have two macros that I add to the Quick Access Toolbar in the title bar that I use all the time.
From what I understand, those macros can only be taken from the document itself or from the template it is based on.
What I am looking for, is a way to either:
Add a QAT button to a macro in another file somewhere.
Base all my documents on a new template (call it abnormal.dot) which in turn is based on normal.dot, so it can retain the macros even when normal.dot is overwritten.
Any other way of achieving my goal.
Any ideas?
You can add additional templates to your Word Application.
Go to Developer Tab on the Ribbon >> Templates section >> press Document Templates...
In new window on Template page you will find Add button on the right- add there some additional templates. This should help.

Excel VBA: How to turn code into a full on toolbar tool? [duplicate]

I am in the process of creating a VBA add-in for Excel 2010, and I used the "Custom UI Editor for Microsoft Office" tool to create my own ribbon.
However, I would like to give the user the option to load my add-in without displaying the ribbon, or with different parts of the ribbon visible.
With menus, I know you can completely control them programmatically, but ribbons seem to work differently.
Is there a way in VBA to not load my customUI.xml ribbon tabs on startup?
Is there a way to remove items from (or add items to) these tabs at runtime?
here is a whole slew of help on this subject Awesome Ribbon Help. I think points 2 and 3 are of particular interest to you.