I have macros in my VbaProject.OTM file. A new toolbar is created when Outlook is launched to allow users to easily run the macros.
(sorry about the interface being in French ;-))
I would like users to be able to customize the toolbar by removing some of its buttons or adding them back. Here is the customization panel:
All my macros are there (all the public Sub()s in modules). However, the macro names and icons aren't really user friendly. I'm looking for a way to change both the icons and names. I'm actually using default FaceIds for my toolbar buttons (but I will add some custom icons in the future too). Also, if there would be a way for some public Sub()s to not me showed there, it would be perfect. Or to add a whole category instead of the Macros category.
When searching through the Web, all I can find is how to add toolbar buttons (which is already done in my example). Does anyone have any idea on how to edit the names/icons in the toolbar Customization panel? Is it possible?
I suggest built-in dialog boxes cannot be modified with VBA.
Try adding a permanent button "Add/delete buttons" to the toolbar, to launch a userform to choose the specific macros you want users to work with. You could then use a better name and other text to describe the macros in your own listbox.
Related
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.
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.
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.
Where I work a department has created several theme files and quickstyle colours they want used in different circumstances.
I am wanting to create a macro that when run would save the theme automatically, and then assign a quickstyle colour group.
I have tried the macro recorder does not provide any hints as the macro is blank after attempting to record the actions, this is using either the mouse or keyboard. Searched everwhere and no solutions.
I can create the ribbon tab and buttons where we will call the macros from, I have already created macros and forms to populate documents with addresses etc.
But I cannot find any where I can set and save a theme or quick style and or colours.
A good idea for VBA is always to look into the Object Explorer in the IDE. Just press F2 while in the VBA Editor and type in the search field "theme".
There are the methods ActiveDocument.ApplyDocumentTheme(Filename as string) and ActiveDocument.ApplyTheme(Name as string). For quick styles you'll find also methods.
I don't have the time to test it, but I guess here you can go on.
I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.