Answered by:
Adding custom action in MS Project 2010

Question
-
hello,
can i add a custom action/button on the ribbon in ms project 2010 from c# ?
thanks
Wednesday, October 6, 2010 2:28 PM
Answers
-
Hi Talhak
OK, that's another side of the question :-) But it does answer what I wanted to know: whether you're considering a Windows Form, Console app, Add-in...
In this case, it must be an Add-in. I can't help you with the code inside of Project to synch with SharePoint - that's something you need to ask in a SharePoint, and possibly also a Project venue. You'll find a full list of forums in the following link:
http://social.msdn.microsoft.com/Forums/en-US/categories
If you want to create a VSTO add-in with a Ribbon we can help you with the mechanics of that in this forum. Start with the MSDN documentation on creating an add-in:
http://msdn.microsoft.com/en-us/library/bb157876.aspx
Note that for Project 2010 you do require Visual Studio 2010 in order to create a VSTO add-in. If you're working with an earlier version of VS you can either create the Add-in using Project 2007 (it should port to 2010 if it doesn't use any of the newer functionality) OR you can create a Shared Add-in, which will be version-independent. Here's some documentation for that:
http://support.microsoft.com/kb/302901
http://msdn.microsoft.com/en-us/library/hcdf9zk2(VS.80).aspx
http://msdn.microsoft.com/en-us/library/bb738433(office.12).aspx
Cindy Meister, VSTO/Word MVPThursday, October 7, 2010 8:57 AM -
so i cannot edit the sync button which is in project, i need to create a separate add in e.g like a button in project 2010 to be able to get my requirements ? thanks
Hi TalhakIf you want to talk about Project, you have to ask in the Project forum - the only thing VSTO has for project is the basic framework for creating an Add-in. It in no way extends the object model, so there's very little (no) expertise about the applicaton in this forum...
I don't know whether Project, itself, has a file-level Ribbon capability. If it does, then you wouldn't need to build an Add-in. But you have to ask this in the Project forum.
But I can tell you that changing the behavior of a built-in command in an Office Ribbon application does require RibbonXML. That supports a <commands> section in which you can specify the built-in command and assign a callback to it. Again, for details for your specific requirement, please ask in the Project forum.
Cindy Meister, VSTO/Word MVPThursday, October 7, 2010 9:39 PM
All replies
-
Hi talhak
What kind of C# solution do you have, or want to have?
Cindy Meister, VSTO/Word MVPWednesday, October 6, 2010 3:46 PM -
hi thanks for the reply,
actually i would like to perform a sync between ms project 2010 and sharepoint list, i want to actually create some sites and lists in sharepoint when i click the sync button in ms project. is their anyway i can do this ? thanks
Thursday, October 7, 2010 3:37 AM -
Hi Talhak
OK, that's another side of the question :-) But it does answer what I wanted to know: whether you're considering a Windows Form, Console app, Add-in...
In this case, it must be an Add-in. I can't help you with the code inside of Project to synch with SharePoint - that's something you need to ask in a SharePoint, and possibly also a Project venue. You'll find a full list of forums in the following link:
http://social.msdn.microsoft.com/Forums/en-US/categories
If you want to create a VSTO add-in with a Ribbon we can help you with the mechanics of that in this forum. Start with the MSDN documentation on creating an add-in:
http://msdn.microsoft.com/en-us/library/bb157876.aspx
Note that for Project 2010 you do require Visual Studio 2010 in order to create a VSTO add-in. If you're working with an earlier version of VS you can either create the Add-in using Project 2007 (it should port to 2010 if it doesn't use any of the newer functionality) OR you can create a Shared Add-in, which will be version-independent. Here's some documentation for that:
http://support.microsoft.com/kb/302901
http://msdn.microsoft.com/en-us/library/hcdf9zk2(VS.80).aspx
http://msdn.microsoft.com/en-us/library/bb738433(office.12).aspx
Cindy Meister, VSTO/Word MVPThursday, October 7, 2010 8:57 AM -
Hi Cindy.
thanks for the reply.
so i cannot edit the sync button which is in project, i need to create a separate add in e.g like a button in project 2010 to be able to get my requirements ? thanks
Thursday, October 7, 2010 6:27 PM -
so i cannot edit the sync button which is in project, i need to create a separate add in e.g like a button in project 2010 to be able to get my requirements ? thanks
Hi TalhakIf you want to talk about Project, you have to ask in the Project forum - the only thing VSTO has for project is the basic framework for creating an Add-in. It in no way extends the object model, so there's very little (no) expertise about the applicaton in this forum...
I don't know whether Project, itself, has a file-level Ribbon capability. If it does, then you wouldn't need to build an Add-in. But you have to ask this in the Project forum.
But I can tell you that changing the behavior of a built-in command in an Office Ribbon application does require RibbonXML. That supports a <commands> section in which you can specify the built-in command and assign a callback to it. Again, for details for your specific requirement, please ask in the Project forum.
Cindy Meister, VSTO/Word MVPThursday, October 7, 2010 9:39 PM