MSAccess VBA Enable/disable item on shortcut menu at runtime - vba

I use several custom Shotcut Menu Bars in my MSAccess solution. If I use the built in shortcut menu bars they will automatically disable, grayed out, an item not available at the time of right clicking. How can I replicate this during run-time on my custom shortcut menu bars? Custom Shortcut Menu Bar In this example I would like to gray out the item "Send SMS" if the contact does not have mobile/cell number. I currently do this by having two different shortcut menus that is set at runtime, depending on if the number is available.

Related

How can one suppress the mini toolbar from appearing on the right-click event in Microsoft Word?

I am working on a custom vb.net application which uses Microsoft Word embedded in it. As the users are restricted to what kind of formatting they are allowed to do while modifying documents, we are using a template which contains custom ribbons and menus.
In the past we have also captured the right-click event to suppress the display of the built-in shortcut menu and mini toolbar.
We would now like to re-activate the right-click to bring up a modified shortcut menu. This we can do through macros and templates. However, we are not able to keep the mini toolbar from appearing on the right-click event. We have turned off the Word Option which automatically brings up the mini toolbar when one selects text, however, that does not affect the behavior of the right-click event.

Can there be two ribbons in an Outlook VSTO Add-in?

I'm using the visual designer and have one custom ribbon with 12 or so buttons on it. I'd like to add the most important button from that ribbon onto "TabMail" so that I can use it more easily.
I have added another ribbon via the "add..." dialog, then ribbon, and then add a test button to it. When I then run the solution (from Visual Studio, debug or release) it seems to pick one ribbon or another to show - either leaving me missing a button, or missing 12!
What am I doing wrong?
I've just found that what I should be using is two Tabs, not two Ribbons. Each tab can appear wherever you want, rather than each having to come up as a separate custom tab.
Here's the setup inside visual studio:
Shown below is "My Button" in blue, and in red is "My Tab"

context menu strip within another context menu

hi guys can any one pls help me with this thanks
Im using vb.nwt 2010
I wanted to create a context menu that shows another context menu when the item is clicked
I already have the running code for the first context menu but im lost at showing another context menu within the first one
thanks any help will be appriciated
If what you are asking is 'Can I create a sub menu on a context menu in the same way that a standard menu has one (as per my illustration)?' then the answer is yes. Just use the ContextMenuStrip control which you can find under the Menus & Toolbars strip in the toolbox panel in visual studio.
Set up the context menu the way that you wish it to be and then assign that context menu as the context menu of whichever control you want to invoke it at runtime.

Dispaly ruler and the grid in powerpoint using VSTO project

I'm new to VSTO development. I need to add a ribbon menu to Power point . And this has a tick to enable ruler and the grid in power Point Slide. Is there any inbuilt method to active those via VSTO project.
You can display the grid lines with this line of code:
Application.DisplayGridLines = True
I'm seeing a way to display the ruler.
What is the scenario for displaying the ruler? Do you want to add button to custom ribbon that displays the ruler? If this is the case, you could use RibbonXML to include the built-in "Show Ruler" checkbox in custom ribbon.
http://msdn.microsoft.com/en-us/library/vstudio/aa942866.aspx

Is it possible to make a statusbar like notepad in VB?

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.