Change background color of richtexttablecell - lotus-notes

I like to change the backgroundcolor of a richtexttablecell, I try to solve the problem with lotusscript, but there isn't an method or attribute for this in lotus script.
looks like it is possible to solve this with c api.
can anyone help me?

Use the NotesDXLExporter and NotesDXLImporter:
export the document as DXL,
replace table properties in DXL and
import it back to document.
Make sure that you use notesDXLExporter.RichTextOption=0.
This is an example for a table with background colors in DXL format:
<item name='Body'>
<richtext>
<pardef id='1' />
<par def='1' />
<table widthtype='fixedleft' refwidth='2.1493in'>
<tablecolumn width='1.0667in' />
<tablecolumn width='1.0826in' />
<tablerow>
<tablecell bgcolor='blue'>
<pardef id='3' keepwithnext='true' keeptogether='true' />
<par def='3' />
</tablecell>
<tablecell bgcolor='red'>
<pardef id='4' keepwithnext='true' keeptogether='true' />
<par def='4' />
</tablecell>
</tablerow>
<tablerow>
<tablecell bgcolor='yellow'>
<par def='3' />
</tablecell>
<tablecell>
<par def='4' />
</tablecell>
</tablerow>
</table>
<par def='1' />
</richtext>
</item>
It should be easy to replace the bgcolor properties in DXL.
You can find a code snippet for DXL-export here.

Background color does not appear to be exposed in the LS NotesRichTextStyle or NotesRightTextParagraphStyle classes. The alternate would to use HTML with MIME or the Midas Rich Text LSX from Genii Soft.

Related

Create a multilevel submenu in Visual Studio Tools menu

Create a multilevel submenu in Visual Studio Tools menu
I am looking to create a multilevel menu within the Visual Studio Tools menu.
I would want the structure as seen to be something like below.
Tools
|->GC
|->Licenses--------------------------->|
|->Samples |-> Activate
|-> Deactivate
From the below code in the .vsct file, I am able to get to the structure as below
Tools|
|->GC->|
|->Licenses
|->Samples.
How would I be able to add a submenu "Licenses" into the GC menu and add the Activate/Deactivate buttons to it?
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Commands package="guidComponentOneMenuPackage">
<Menus>
<Menu guid="guidComponentOneMenuPackageCmdSet" id="TopLevelMenu" priority="0x700" type="Menu">
<Parent guid="guidSHLMainMenu" id="IDG_VS_TOOLS_EXT_TOOLS" />
<Strings>
<ButtonText>GC</ButtonText>
<CommandName>GC</CommandName>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidComponentOneMenuPackageCmdSet" id="MyMenuGroup" priority="0x0600">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="TopLevelMenu"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidComponentOneMenuPackageCmdSet" id="LicenseManagerId" priority="0x0100" type="Button">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="MyMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Licenses</ButtonText>
</Strings>
</Button>
<Button guid="guidComponentOneMenuPackageCmdSet" id="SamplesExplorerId" priority="0x0101" type="Button">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="MyMenuGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Samples</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
<Bitmap guid="guidImages" href="Resources\GC.png" usedList="bmpPic1"/>
</Bitmaps>
</Commands>
<Symbols>
<GuidSymbol name="guidComponentOneMenuPackage" value="{458b53ac-7a4e-440d-aebf-d3eec4fd24e2}" />
<GuidSymbol name="guidComponentOneMenuPackageCmdSet" value="{d2b0b608-ab47-47c6-a9a3-d0cf3b64157b}">
<IDSymbol name="MyMenuGroup" value="0x1020" />
<IDSymbol name="LicenseManagerId" value="0x0100" />
<IDSymbol name="SamplesExplorerId" value="0x0101" />
<IDSymbol name="TopLevelMenu" value="0x1021"/>
</GuidSymbol>
<GuidSymbol name="guidImages" value="{6e5edeb3-274c-4147-a06d-7f50f10160b9}" >
<IDSymbol name="bmpPic1" value="1" />
</GuidSymbol>
</Symbols>
</CommandTable>
We will be able to create multilevel menus by merely adding more groups and setting their priority as below.
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18 /CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Commands package="guidComponentOneMenuPackage">
<Menus>
<Menu guid="guidComponentOneMenuPackageCmdSet" id="TopLevelMenu" priority="0x700" type="Menu">
<Parent guid="guidSHLMainMenu" id="IDG_VS_TOOLS_EXT_TOOLS" />
<Strings>
<ButtonText>GC</ButtonText>
<CommandName>GC</CommandName>
</Strings>
</Menu>
<Menu guid="guidComponentOneMenuPackageCmdSet" id="GCMenu" priority="0x0200" type="Menu">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="MyMenuGroup" />
<Strings>
<ButtonText>Main</ButtonText>
<CommandName>Main</CommandName>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidComponentOneMenuPackageCmdSet" id="GCGroup" priority="0x0600">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="GCMenu"/>
</Group>
<Group guid="guidComponentOneMenuPackageCmdSet" id="MyMenuGroup" priority="0x0600">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="TopLevelMenu"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidComponentOneMenuPackageCmdSet" id="LicenseManagerId" priority="0x0201" type="Button">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="GCGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Licenses</ButtonText>
</Strings>
</Button>
<Button guid="guidComponentOneMenuPackageCmdSet" id="SamplesExplorerId" priority="0x0202" type="Button">
<Parent guid="guidComponentOneMenuPackageCmdSet" id="GCGroup" />
<Icon guid="guidImages" id="bmpPic1" />
<Strings>
<ButtonText>Samples</ButtonText>
</Strings>
</Button>
</Buttons>
<Bitmaps>
</Bitmaps>
</Commands>
<Symbols>
<IDSymbol name="MyMenuGroup" value="0x1020" />
<IDSymbol name="GCGroup" value="0x0202" />
<IDSymbol name="LicenseManagerId" value="0x0100" />
<IDSymbol name="SamplesExplorerId" value="0x0101" />
<IDSymbol name="TopLevelMenu" value="0x1021"/>
<IDSymbol name="GCMenu" value="0x1022"/>
</GuidSymbol>
</Symbols>
</CommandTable>

DocuSign API - Creating an envelope with a Document that has an Approve button

I am creating a draft envelope with a TXT document - which needs to display an Approve button to allow the signer to sign without placing a signature/initials on the document itself. Unfortunately I can't get the Approve button to show on the document, where have I gone wrong?
Here is the Request XML:
<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
<ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
<ns1:documents>
<ns1:document>
<ns1:name>TestDocument</ns1:name>
<ns1:documentId>1</ns1:documentId>
<ns1:documentBase64><Base64BytesHere></ns1:documentBase64>
<ns1:fileExtension>txt</ns1:fileExtension>
</ns1:document>
</ns1:documents>
<ns1:recipients>
<ns1:signers>
<ns1:signer>
<ns1:routingOrder>1</ns1:routingOrder>
<ns1:recipientId>1</ns1:recipientId>
<ns1:name>John Smith</ns1:name>
<ns1:email>nobody#nobody.com</ns1:email>
</ns1:signer>
</ns1:signers>
</ns1:recipients>
<ns1:tabs>
<ns1:approveTabs>
<ns1:approve>
<anchorCaseSensitive />
<anchorHorizontalAlignment />
<anchorIgnoreIfNotPresent />
<anchorMatchWholeWord />
<anchorString />
<anchorUnits />
<anchorXOffset />
<anchorYOffset />
<conditionalParentLabel />
<conditionalParentValue />
<customTabId />
<documentId>1</documentId>
<mergeField />
<pageNumber>1</pageNumber>
<recipientId>1</recipientId>
<tabId />
<tabOrder />
<templateLocked />
<templateRequired />
<xPosition>100</xPosition>
<yPosition>100</yPosition>
<bold />
<font />
<fontColor />
<fontSize />
<italic />
<tabLabel />
<underline />
<buttonText />
<height>30</height>
<width>50</width>
</ns1:approve>
</ns1:approveTabs>
</ns1:tabs>
</ns1:envelopeDefinition>
Essentially I am looking for something that looks like the attached screenshot
The <tabs> node should be inside the <signer> node. The following example should work.
<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
<ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
<ns1:documents>
<ns1:document>
<ns1:name>TestDocument</ns1:name>
<ns1:documentId>1</ns1:documentId>
<ns1:fileExtension>txt</ns1:fileExtension>
<ns1:documentBase64>RG9jIFRXTyBUV08gVFdP</ns1:documentBase64>
<ns1:fileExtension>txt</ns1:fileExtension>
</ns1:document>
</ns1:documents>
<ns1:recipients>
<ns1:signers>
<ns1:signer>
<ns1:routingOrder>1</ns1:routingOrder>
<ns1:recipientId>1</ns1:recipientId>
<ns1:name>John Smith</ns1:name>
<ns1:email>johnsmith#acme.com</ns1:email>
<ns1:tabs>
<ns1:approveTabs>
<ns1:approve>
<documentId>1</documentId>
<pageNumber>1</pageNumber>
<xPosition>100</xPosition>
<yPosition>100</yPosition>
<height>30</height>
<width>50</width>
</ns1:approve>
</ns1:approveTabs>
</ns1:tabs>
</ns1:signer>
</ns1:signers>
</ns1:recipients>
</ns1:envelopeDefinition>

When implementing a VSPackage (VSIX) for VS2015, how do I get my new commands listed in Options-Keyboard?

I have just created my first VSPackage (since VS2015 doesn't support AddIns).
While I have managed to assign keyboard shortcuts within my VSPackage (using KeyBindings), I have found that the commands themselves do not seem to be listed within the Options-Keyboard tab in Visual Studio.
I notice that the other extensions that I have installed include their commands for assigning within Options-Keyboard.
What must I do to get mine included?
Here are the full contents of my VSCT file - apologies if there's a better way to attach this, but I couldn't find one:
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is the file that defines the actual layout and type of the commands.
It is divided in different sections (e.g. command definition, command
placement, ...), with each defining a specific set of properties.
See the comment before each section for more details about how to
use it. -->
<!-- The VSCT compiler (the tool that translates this file into the binary
format that VisualStudio will consume) has the ability to run a preprocessor
on the vsct file; this preprocessor is (usually) the C++ preprocessor, so
it is possible to define includes and macros with the same syntax used
in C++ files. Using this ability of the compiler here, we include some files
defining some of the constants that we will use inside the file. -->
<!--This is the file that defines the IDs for all the commands exposed by VisualStudio. -->
<Extern href="stdidcmd.h" />
<!--This header contains the command ids for the menus provided by the shell. -->
<Extern href="vsshlids.h" />
<!--The Commands section is where commands, menus, and menu groups are defined.
This section uses a Guid to identify the package that provides the command defined inside it. -->
<Commands package="guidDanBarPackage">
<!-- Inside this section we have different sub-sections: one for the menus, another
for the menu groups, one for the buttons (the actual commands), one for the combos
and the last one for the bitmaps used. Each element is identified by a command id that
is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
called "command set" and is used to group different command inside a logically related
group; your package should define its own command set in order to avoid collisions
with command ids defined by other packages. -->
<Menus>
<Menu guid="guidDanBarPackageCmdSet" id="MyToolbar" type="Toolbar">
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>Dan Bar</ButtonText>
<CommandName>Dan Bar</CommandName>
</Strings>
</Menu>
</Menus>
<Menus>
<Menu guid="guidDanBarPackageCmdSet" id="BriefToolbar" type="Toolbar">
<CommandFlag>DefaultDocked</CommandFlag>
<Strings>
<ButtonText>Dan Brief Bar</ButtonText>
<CommandName>Dan Brief Bar</CommandName>
</Strings>
</Menu>
</Menus>
<!-- In this section you can define new menu groups. A menu group is a container for
other menus or buttons (commands); from a visual point of view you can see the
group as the part of a menu contained between two lines. The parent of a group
must be a menu. -->
<Groups>
<Group guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" priority="0x0000">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbar" />
</Group>
<Group guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" priority="0x0000">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbar" />
</Group>
</Groups>
<!--Buttons section. -->
<!--This section defines the elements the user can interact with, like a menu command or a button
or combo box in a toolbar. -->
<Buttons>
<!--To define a menu group you have to specify its ID, the parent menu and its display priority.
The command is visible and enabled by default. If you need to change the visibility, status, etc, you can use
the CommandFlag node.
You can add more than one CommandFlag node e.g.:
<CommandFlag>DefaultInvisible</CommandFlag>
<CommandFlag>DynamicVisibility</CommandFlag>
If you do not want an image next to your command, remove the Icon node /> -->
<Button guid="guidDanBarPackageCmdSet" id="cmdidConcurrentBuilds" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic1" />
<Strings>
<ButtonText>Set Concurrent Builds</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidTrackInSolutionExplorer" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic2" />
<Strings>
<ButtonText>Track In Solution Explorer</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBuildStartupProject" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic3" />
<Strings>
<ButtonText>Build Startup Project</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidCommentOutParam" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic4" />
<Strings>
<ButtonText>Comment Out Parameter</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidInsertRegion" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic5" />
<Strings>
<ButtonText>Insert Region</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentFull" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic6" />
<Strings>
<ButtonText>Full XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentSmall" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic7" />
<Strings>
<ButtonText>Small XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentTiny" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic8" />
<Strings>
<ButtonText>Tiny XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentMember" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic9" />
<Strings>
<ButtonText>Member XML Comment</ButtonText>
</Strings>
</Button>
<Button guid="guidVSStd97" id="cmdidMoreWindows" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="MyToolbarGroup" />
<Icon guid="guidDanBarImages" id="bmpPic10" />
<Strings>
<ButtonText>Win...</ButtonText>
</Strings>
</Button>
<!--BRIEF buttons-->
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltD" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic1" />
<Strings>
<ButtonText>Brief Alt D - Line Delete</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltMinus" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic3" />
<Strings>
<ButtonText>Brief Num-Minus - Line Cut</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltPlus" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic4" />
<Strings>
<ButtonText>Brief Num-Plus - Line Copy</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefAltC" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic2" />
<Strings>
<ButtonText>Brief Alt C - Block Select</ButtonText>
</Strings>
</Button>
<Button guid="guidDanBarPackageCmdSet" id="cmdidBriefLinePaste" priority="0x0100" type="Button">
<Parent guid="guidDanBarPackageCmdSet" id="BriefToolbarGroup" />
<Icon guid="guidBriefBarImages" id="bmpPic5" />
<Strings>
<ButtonText>Brief Insert - Line Paste</ButtonText>
</Strings>
</Button>
</Buttons>
<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
<Bitmaps>
<!-- The bitmap id is defined in a way that is a little bit different from the others:
the declaration starts with a guid for the bitmap strip, then there is the resource id of the
bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
inside a button definition. An important aspect of this declaration is that the element id
must be the actual index (1-based) of the bitmap inside the bitmap strip. -->
<Bitmap guid="guidDanBarImages" href="Resources\DanBar.png" usedList="bmpPic1, bmpPic2, bmpPic3, bmpPic4, bmpPic5, bmpPic6, bmpPic7, bmpPic8, bmpPic9, bmpPic10" />
<Bitmap guid="guidBriefBarImages" href="Resources\BriefBar.png" usedList="bmpPic1, bmpPic2, bmpPic3, bmpPic4, bmpPic5, bmpPic6" />
</Bitmaps>
</Commands>
<KeyBindings>
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidXMLCommentSmall" editor="guidVSStd97" key1="q" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltD" editor="guidVSStd97" key1="d" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltMinus" editor="guidVSStd97" key1="VK_SUBTRACT" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltPlus" editor="guidVSStd97" key1="VK_ADD" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefAltC" editor="guidVSStd97" key1="c" mod1="Alt" />
<KeyBinding guid="guidDanBarPackageCmdSet" id="cmdidBriefLinePaste" editor="guidVSStd97" key1="VK_INSERT" />
</KeyBindings>
<Symbols>
<!-- This is the package guid. -->
<GuidSymbol name="guidDanBarPackage" value="{69fa005b-6bae-4a69-84e6-ed7cf75cc180}" />
<!-- This is the guid used to group the menu commands together -->
<GuidSymbol name="guidDanBarPackageCmdSet" value="{a2ce5715-189e-4bfc-bc37-4d1b6e0c1122}">
<IDSymbol name="MyToolbar" value="0x1000" />
<IDSymbol name="MyToolbarGroup" value="0x1050" />
<IDSymbol name="BriefToolbar" value="0x1100" />
<IDSymbol name="BriefToolbarGroup" value="0x1150" />
<IDSymbol name="cmdidConcurrentBuilds" value="256" />
<IDSymbol name="cmdidTrackInSolutionExplorer" value="257" />
<IDSymbol name="cmdidBuildStartupProject" value="258" />
<IDSymbol name="cmdidCommentOutParam" value="259" />
<IDSymbol name="cmdidXMLCommentFull" value="260" />
<IDSymbol name="cmdidXMLCommentSmall" value="261" />
<IDSymbol name="cmdidXMLCommentTiny" value="262" />
<IDSymbol name="cmdidXMLCommentMember" value="263" />
<IDSymbol name="cmdidInsertRegion" value="264" />
<IDSymbol name="cmdidBriefAltD" value="270" />
<IDSymbol name="cmdidBriefAltMinus" value="271" />
<IDSymbol name="cmdidBriefAltPlus" value="272" />
<IDSymbol name="cmdidBriefAltC" value="273" />
<IDSymbol name="cmdidBriefLinePaste" value="274" />
</GuidSymbol>
<GuidSymbol name="guidDanBarImages" value="{ffb25733-9517-4411-bae2-4deda791fd6c}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPic3" value="3" />
<IDSymbol name="bmpPic4" value="4" />
<IDSymbol name="bmpPic5" value="5" />
<IDSymbol name="bmpPic6" value="6" />
<IDSymbol name="bmpPic7" value="7" />
<IDSymbol name="bmpPic8" value="8" />
<IDSymbol name="bmpPic9" value="9" />
<IDSymbol name="bmpPic10" value="10" />
</GuidSymbol>
<GuidSymbol name="guidBriefBarImages" value="{f1a36fcd-2c27-4151-ae23-42fff88c212c}">
<IDSymbol name="bmpPic1" value="1" />
<IDSymbol name="bmpPic2" value="2" />
<IDSymbol name="bmpPic3" value="3" />
<IDSymbol name="bmpPic4" value="4" />
<IDSymbol name="bmpPic5" value="5" />
<IDSymbol name="bmpPic6" value="6" />
</GuidSymbol>
</Symbols>
</CommandTable>
Usually, a command belongs to a menu and is included in Options-Keyboard from this menu. As your commands belong only to a toolbar, this is not the case.
You can add the LocCanonicalName tag to your .vsct button definitions to include your commands to Options-Keyboard like this:
<Strings>
<LocCanonicalName>DanBar.TrackInSolutionExplorer</LocCanonicalName>
<ButtonText>Track In Solution Explorer</ButtonText>
</Strings>
You should define your commands in Visual Studio Command Table (.vsct) file and create event handlers for them in code. See Commands, Menus, and Toolbars.
VS 2015 includes the Custom Command template that you can add to your project to quickly get started:

Excel/RibbonUI menu disabled

Note The following problem was solved by creating a new workbook copying all the data, macros and other code across. Any insight into what causes a workbook to "break" would be welcome!
I have an excel file with a custom ribbonui. I've recently added a new group with a new menu, it (was) copied from the first group and certain items were removed.
The first group "library" and all its controls work as expected. The "documentmenu" menu in the "document" group however is grayed out and I cannot figure out why!
I've tried adding in a getEnabled and plain enabled attribute to the menu but it wont fire, neither will any of the getEnabled events for the menu's contained buttons.
When I open the ribbon for the first time the getLabel event does fire and sets the label correctly.
I've tried re-naming the group and all the controls to something without "document" in-case it's conflicting somehow, but again no go.
Does anyone know what might be causing this to happen?
Below is the entire customui xml file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI
onLoad="CustomUI.Ribbon_onLoad"
xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab
id="Main"
label="Initech">
<group
id="Library"
label="Library"
tag="Library"
centerVertically="true">
<menu
id="LibraryMenu"
tag="Library"
image="gear"
getLabel="CustomUI.Menu_getLabel">
<button
id="LibraryMenu_Open"
tag="Library"
label="Open Library"
imageMso="FileOpen"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="LibraryMenu_New"
tag="Library"
label="New Library"
imageMso="FileNew"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<menuSeparator
id="LibraryMenu_Separator0" />
<button
id="LibraryMenu_Save"
tag="Library"
label="Save"
imageMso="FileSave"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="LibraryMenu_Close"
tag="Library"
label="Close"
imageMso="FileClose"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="LibraryMenu_Default"
tag="Library"
label="Set as Default"
imageMso="AcceptInvitation"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<menuSeparator
id="LibraryMenu_Separator1" />
<button
id="LibraryMenu_Add"
tag="Library"
label="Add Component"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="LibraryMenu_Editor"
tag="Library"
label="Edit Menu"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
</menu>
<dynamicMenu
id="LibraryComponents"
tag="Library"
image="book_stack"
getLabel="CustomUI.Menu_getLabel"
getEnabled="CustomUI.Menu_getEnabled"
getContent="CustomUI.Menu_getContent" />
</group>
<group
id="Document"
label="Document"
tag="Document"
centerVertically="true">
<menu
id="DocumentMenu"
tag="Document"
imageMso="FileOpen"
getLabel="CustomUI.Menu_getLabel">
<button
id="DocumentMenu_Open"
tag="Document"
label="Open Document"
imageMso="FileOpen"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="DocumentMenu_New"
tag="Document"
label="New Document"
imageMso="FileNew"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<menuSeparator
id="DocumentMenu_Separator0" />
<button
id="DocumentMenu_Save"
tag="Document"
label="Save"
imageMso="FileSave"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
<button
id="DocumentMenu_Close"
tag="Document"
label="Close"
imageMso="FileClose"
getEnabled="CustomUI.Button_getEnabled"
onAction="CustomUI.Button_onAction" />
</menu>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Update after hours of playing about trying to figure out whats going on, turns out my workbook is damaged some how. The code works fine if I put it into a new workbook.
centerVertically is not a valid property.
Kindly refer this link
getEnabled="CustomUI.Button_getEnabled" & onAction="CustomUI.Button_onAction"
Avoid period . in name of callback function as we cannot define a sub/function like CustomUI.Button_getEnabled.
3 when using getEnabled attribute for a button a callback function is to be called when the application needs to determine the enabled state of the button.
sample code - getEnabled for ribbion

Ribbon Contextual Groups and Tabs in SharePoint

I am new to SharePoint ribbon. Why do I not see the View and Edit buttons in the Manage group of my tab?
Here are my definitions for your reference:
<ContextualGroup Id="Ribbon.MyWorkContextualTabGroup"
Color="Blue" Title="{title}"
Command="MyWorkContextualTab.EnableContextualGroup"
Sequence="502"
ContextualGroupId="MyWorkContextualTabGroup">
<Tab Id="Ribbon.MyWorkTab"
Title="My Work"
Description="My Work tab description"
Command="MyWorkContextualTab.EnableMyWorkTab"
Sequence="501">
<Scaling Id="Ribbon.MyWorkTab.Scaling">
<MaxSize Id="Ribbon.MyWorkTab.MaxSize_New"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_New"
Size="MyWorkLayout"
Sequence="10"/>
<MaxSize Id="Ribbon.MyWorkTab.MaxSize_Manage"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_Manage"
Size="MyWorkLayout"
Sequence="20" />
<Scale Id="Ribbon.MyWorkTab.Scalling.MyWorkTabScalling_New"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_New"
Size="MyWorkLayout"
Sequence="30" />
<Scale Id="Ribbon.MyWorkTab.Scalling.MyWorkTabScalling_Manage"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_Manage"
Size="MyWorkLayout"
Sequence="40"/>
</Scaling>
<Groups Id="Ribbon.MyWorkTab.Groups">
<Group Id="Ribbon.MyWorkTab.MyWorkGroup_New"
Description="New group description"
Title="New"
Command="MyWorkContextualTab.EnableMyWorkGroup_New"
Sequence="52"
Template="Ribbon.Templates.MyWorkTemplate">
<Controls Id="Ribbon.MyWorkTab.MyWorkGroup_New.Controls">
<Button Id="Ribbon.MyWorkTab.MyWorkGroup_New.NewItem"
Command="MyWorkContextualTab.NewItemCommand"
Sequence="15"
Description="Add a new item"
LabelText="New Item"
TemplateAlias="ONE_R1"
Image32by32="_layouts/images/mywork/ribbon/newitem.png" />
</Controls>
</Group>
<Group Id="Ribbon.MyWorkTab.MyWorkGroup_Manage"
Description="Manage group description"
Title="Manage"
Command="MyWorkContextualTab.EnableMyWorkGroup_Manage"
Sequence="53"
Template="Ribbon.Templates.MyWorkTemplate">
<Controls Id="Ribbon.MyWorkTab.MyWorkGroup_Manage.Controls">
<Button Id="Ribbon.MyWorkTab.MyWorkGroup_Manage.ViewItem"
Command="MyWorkContextualTab.ViewItemCommand"
Sequence="25"
Description="View this item"
LabelText="View Item"
TemplateAlias="ONE_R1"
Image32by32="_layouts/images/mywork/ribbon/viewitem.png" />
<Button Id="Ribbon.MyWorkTab.MyWorkGroup_Manage.EditItem"
Command="MyWorkContextualTab.EditItemCommand"
Sequence="35"
Description="Edit this item"
LabelText="Edit Item"
TemplateAlias="ONE_R1"
Image32by32="_layouts/images/mywork/ribbon/edititem.png" />
</Controls>
</Group>
</Groups>
</Tab>
</ContextualGroup>
<GroupTemplate Id="Ribbon.Templates.MyWorkTemplate">
<Layout Title="MyWorkLayout" LayoutTitle="MyWorkLayout">
<Section Alignment="Top" Type="OneRow">
<Row>
<ControlRef DisplayMode="Large" TemplateAlias="ONE_R1"/>
</Row>
</Section>
<Section Alignment="Top" Type="ThreeRow">
<Row>
<ControlRef DisplayMode="Medium" TemplateAlias="THE_R1"/>
</Row>
<Row>
<ControlRef DisplayMode="Medium" TemplateAlias="THE_R2"/>
</Row>
<Row>
<ControlRef DisplayMode="Medium" TemplateAlias="THE_R3"/>
</Row>
</Section>
</Layout>
</GroupTemplate>
I havent worked with Sharepoint's Ribbon much, but from what I understand it is almost identical to CRM 2011 ribbon structure. When the issue of missing buttons crop up in CRM it is usually a sequence issue with Scaling and MaxSize.
All of the MaxSize element need to come before the Scale elements in terms of sequence. I would try adding the sequence numbers to the MaxSize/Scale elements in your Scaling section and adjust the numbers to make sure maxsize appears before scale.
Hope this helps.
example:
<Scaling Id="Ribbon.MyWorkTab.Scaling">
<MaxSize Id="Ribbon.MyWorkTab.MaxSize_New"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_New"
Size="MyWorkLayout"
Sequence="10"/>
<MaxSize Id="Ribbon.MyWorkTab.MaxSize_Manage"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_Manage"
Size="MyWorkLayout"
Sequence="20" />
<Scale Id="Ribbon.MyWorkTab.Scalling.MyWorkTabScalling_New"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_New"
Size="MyWorkLayout"
Sequence="30" />
<Scale Id="Ribbon.MyWorkTab.Scalling.MyWorkTabScalling_Manage"
GroupId="Ribbon.MyWorkTab.MyWorkGroup_Manage"
Size="MyWorkLayout"
Sequence="40"/>
</Scaling>
Okay this is what I had to do:
Do not use _ (underscore) in the Id.
Change my layout to use OverflowSection
Here are my final definitions in case if you need:
<ContextualGroup Id="Ribbon.MyWorkContextualTabGroup"
Color="Blue" Title="{title}"
Command="MyWorkContextualTab.EnableContextualGroup"
Sequence="502"
ContextualGroupId="MyWorkContextualTabGroup">
<Tab Id="Ribbon.MyWorkTab"
Title="My Work"
Description="My Work tab description"
Command="MyWorkContextualTab.EnableMyWorkTab"
Sequence="501">
<Scaling Id="Ribbon.MyWorkTab.Scaling">
<MaxSize Id="Ribbon.MyWorkTab.MaxSizeNew"
GroupId="Ribbon.MyWorkTab.MyWorkGroupNew"
Size="MyWorkLayout"
Sequence="10"/>
<MaxSize Id="Ribbon.MyWorkTab.MaxSizeManage"
GroupId="Ribbon.MyWorkTab.MyWorkGroupManage"
Size="MyWorkLayout"
Sequence="20" />
<Scale Id="Ribbon.MyWorkTab.Scaling.MyWorkTabScalingNew"
GroupId="Ribbon.MyWorkTab.MyWorkGroupNew"
Size="MyWorkLayout"
Sequence="30" />
<Scale Id="Ribbon.MyWorkTab.Scaling.MyWorkTabScalingManage"
GroupId="Ribbon.MyWorkTab.MyWorkGroupManage"
Size="MyWorkLayout"
Sequence="40"/>
</Scaling>
<Groups Id="Ribbon.MyWorkTab.Groups">
<Group Id="Ribbon.MyWorkTab.MyWorkGroupNew"
Description="New group description"
Title="New"
Command="MyWorkContextualTab.EnableMyWorkGroupNew"
Sequence="52"
Template="Ribbon.Templates.MyWorkTemplate">
<Controls Id="Ribbon.MyWorkTab.MyWorkGroupNew.Controls">
<Button Id="Ribbon.MyWorkTab.MyWorkGroupNew.NewItem"
Command="MyWorkContextualTab.NewItemCommand"
Sequence="15"
Description="Add a new item"
LabelText="New Item"
TemplateAlias="ONERW"
Image32by32="_layouts/images/mywork/ribbon/newitem-32.png" />
</Controls>
</Group>
<Group Id="Ribbon.MyWorkTab.MyWorkGroupManage"
Description="Manage group description"
Title="Manage"
Command="MyWorkContextualTab.EnableMyWorkGroupManage"
Sequence="53"
Template="Ribbon.Templates.MyWorkTemplate">
<Controls Id="Ribbon.MyWorkTab.MyWorkGroupManage.Controls">
<Button Id="Ribbon.MyWorkTab.MyWorkGroupManage.ViewItem"
Command="MyWorkContextualTab.ViewItemCommand"
Sequence="25"
Description="View this item"
LabelText="View Item"
TemplateAlias="ONERW"
Image32by32="_layouts/images/mywork/ribbon/viewitem-32.png" />
<Button Id="Ribbon.MyWorkTab.MyWorkGroupManage.EditItem"
Command="MyWorkContextualTab.EditItemCommand"
Sequence="35"
Description="Edit this item"
LabelText="Edit Item"
TemplateAlias="ONERW"
Image32by32="_layouts/images/mywork/ribbon/edititem-32.png" />
</Controls>
</Group>
</Groups>
</Tab>
</ContextualGroup>
<GroupTemplate Id="Ribbon.Templates.MyWorkTemplate">
<Layout Title="MyWorkLayout" LayoutTitle="MyWorkLayout">
<OverflowSection Type="OneRow" DisplayMode="Large" TemplateAlias="ONERW"/>
</Layout>
</GroupTemplate>

Resources