I am currently developing custom macros for recording interviews.
These macros are placed on the interview minutes.
The macros have the standard picture of recording/play/pause. But I would like to be able to distinguish when the record is active or inactive by looking at the macro buttons.
Do you know if it is possible to have a pushbutton with two differents photos:
one when it is pushed
another one when it is not activated
OR If it is possible to modify the colors of the pushbutton when its status changes.
you can add you custom task/events to the office UI ribbon. I've mentioned a link where the use can manipulate/change the icons when a function/task is in execution.
Link:
http://gregmaxey.mvps.org/word_tip_pages/ribbon_images_labels_part_IV.html
Related
I am trying to write a VBA macro that runs when opening a .docx document. I want it to force the display of the Navigation Pane and then force all of the headings (any level) to display in collapsed mode. I am trying to get the code for the Collapse command using the macro recorder.
All I have when I record the macro is:
ActiveWindow.DocumentMap = True
Right-clicking on a heading in the Navigation Pane and collapsing does not record a code line. Is there a VBA method for this event?
I "solved" this requirement for myself by means of an AutoHotKey script, which just sends the necessary mouse click and subsequent key strokes. Not beautiful, but it works most of the times.
Kind regards, Hauke
As of this writing in 2019, this is not possible through VBA. It's been asked for from Microsoft for a long time.
As originally suggested in this Microsoft forum post, the quickest way to collapse all of the headings in the Navigation pane is to right-click one of the headings and click Collapse All. Obviously this is not an automated/macro-based solution, but it's all we have until Microsoft exposes the task panes through the VBA object model.
I am new in excel vb.net programming. I am building a excel add-in like the image attached. I have searched but did not find a way to create its UI like the attached image. Please let me know if its possible or not, if yes, please provide me the links.
Thank you so much
You can easily add your own buttons, graphics to Excel or any Office product (Word/Power Point/Excel/ etc) by simply right clicking the ribbon area, then choosing [Customize the Ribbon].
In the next window, if you want your buttons to be displayed on their own Ribbon, create a new Ribbon.
Add as many buttons as you want, and you can separate them if you like.
You can read more about Customizing Ribbons in Office products here.
You can create a new tab on your ribbon as Ahmad has mentioned. You can then add buttons to your new ribbon tab and have them execute macros that you have written. For example, if while working in Excel, you have to highlight cells often with yellow, you can write a macro in your personal workbook then have a button in your new tab execute that macro.
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.
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.