Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Create a call Back to button control in Ribbon

Create a call Back to button control in Ribbon

Scheduled Pinned Locked Moved C#
csharpvisual-studioxmltutorialquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mandar777
    wrote on last edited by
    #1

    Hello all, I want to create an Word add-In in Visual studio. I used word Add-In feature for the same, Now i added the ribbon file to it which has a new tab and a button control. I would like to show message on click of this button control. I read the full article about this in MSDN, and did following steps: Exported the ribbon to xml Wrote the OnAction attribute to the button control in xml But still it's not working. I wrote the following code in Ribbon1.cs:

    private void button1_Click(object sender, RibbonControlEventArgs e)
    {
    MessageBox.Show("Hello");
    }

    Tell me how to call this method ? how to write the same in Ribbon call Back region......??? :^)

    M 1 Reply Last reply
    0
    • M mandar777

      Hello all, I want to create an Word add-In in Visual studio. I used word Add-In feature for the same, Now i added the ribbon file to it which has a new tab and a button control. I would like to show message on click of this button control. I read the full article about this in MSDN, and did following steps: Exported the ribbon to xml Wrote the OnAction attribute to the button control in xml But still it's not working. I wrote the following code in Ribbon1.cs:

      private void button1_Click(object sender, RibbonControlEventArgs e)
      {
      MessageBox.Show("Hello");
      }

      Tell me how to call this method ? how to write the same in Ribbon call Back region......??? :^)

      M Offline
      M Offline
      mandar777
      wrote on last edited by
      #2

      Can any one please help me , i have to finish it today....

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups