RibbonXML Development

S

Scev

I'm looking for a way to add in a group to both the New Message and Reading a
message ribbon. Using the Ribbon XML (in VS 2008 / C#) that task was very
easy, I added this xml:
<tabs>
<tab idMso="TabNewMailMessage">
<group id="group1" label="MEDAC">
<button id="button1" onAction="button2_Click"
label="Search Cases" showImage="false" />
<editBox id="editBox1" label="Case No.:"
showImage="false" />
</group>
</tab>
<tab idMso="TabReadMessage">
<group id="rgroup1" label="MEDAC">
<button id="rbutton1" onAction="button2_Click" label="Search
Cases" showImage="false" />
<editBox id="reditBox1" label="Case No.:" showImage="false" />
</group>
</tab>
</tabs>

The problem is my onAction="button2_Click" does not seem to fire. I'm not
sure if I have the correct event handler signature and have not been able to
find any info online, I've tried a number of function signature, like this:
public void button2_Click(object sender, RibbonControlEventArgs e)
but have yet to get anything to fire. Any help??

Second question is how can I add a menu item under the FileSaveAsMenu
command? I've seen it done, I would like a way for my Outlook user to click
Save As then see my options to save the email and/or attachments to a special
repository. How do I modify the XML (I assume via the <commands> node) to
support a custom Save As menu item??
 
S

Scev

Okay, found the answer to first first part of my post, the signature is
simply: public void btnSearchCase_Click(Office.IRibbonControl control)

Now any help on adding my own item under the Save As many?
 
S

Scev

:) Found my other answer at well, just in case someone else is trying the
same thing the XML looks like this:

<officeMenu>
<splitButton idMso="FileSaveAsMenu">
<menu>
<button id="saveAsButton" label="button1" />
</menu>
</splitButton>
</officeMenu>

In the Ribbon node. I'm an Office RibbonX developer noob, so please feel
free to point out any issues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top