Creation of MS Project Add-in

Ram.kanumuri
Posted by in Others category on for Intermediate level | Points: 250 | Views : 9340 red flag
Rating: 4 out of 5  
 1 vote(s)

Now we can customize any of the MS office products using the Add-Ins. In this article we will discuss about how to create an application level MS Project custom add-in and ribbon. This article will be more useful for those who are already working with custom MS Project Add-in.

Using the MS Project add-in we can create our own ribbon tabs, controls and functionality. Let us first look into how to create a simple Add-In for our MS Project.

1.         Open visual studio and select “New Project” from File menu. 


2.         Select “Office à 2010” from installed template and “Project 2010 Add-in” project template.



3.         This will add a set of files to out project. The default files added to the project is as below.


The main file is “ThisAddIn.cs”. By default this file has two events, one is “ThisAddIn_Startup” and other one is “ThisAddIn_Shutdown”. We will look into these events latter.



 
4.         Adding Ribbon: Right click on the project and add new item and select “Ribbon (Visual designer)”.



 
5.         Now, we will add few controls to our ribbon.  For this sample, I am dragging a new button control to my ribbon.



6.         Now, let us see how to handle the event related to the button. We can see the Design file (CustomRibbon.cs[Design]) from above screen and it has also code behind. To add event handler to button, just double click on it then event gets register and available in code behind file. I have written one line of code to display message box.

7.         Now run the application. We can see the tab(Add-Ins) which is created by our code and can also modify the name. And we can also see the button and message box which is fired by the button click event.


Conclusion

In this article we discussed about creation of Add-in project and Ribbon through visual designer. This visual designer doesn’t provide more customization options like placing our custom images to controls, screen tip, super tip, enable/disable etc. But we can achieve it through Ribbon XML. We will discuss more on these kind of customization in my next article.

Page copy protected against web site content infringement by Copyscape

About the Author

Ram.kanumuri
Full Name: Kodanda Ramaiah Kanumuri
Member Level: Starter
Member Status: Member
Member Since: 4/6/2011 2:19:52 AM
Country: India

http://www.dotnetfunda.com
I have good experience on EPM 2010

Login to vote for this post.

Comments or Responses

Posted by: Karthikanbarasan on: 4/7/2011 | Points: 25
Nice one... new to learn!!!

Login to post response

Comment using Facebook(Author doesn't get notification)