Ok so i want to build an Excel plugin (custom task pane) that'll act on the selected range in the active worksheet.
Can't find any examples or documentation on how.
In addition to the references Mitch listed, I wrote an Excel VSTO add-in tutorial which uses a custom task pane to find differences between sheets and navigate to cells with differences on the active worksheet. Hopefully you'll find it helpful!
Office Development with Visual Studio: VSTO Developer Centre
Office Development with Visual Studio (MSDN Blog)
Office Development with Visual Studio Tutorial Series
Related
UPDATE: okey seems it's all about using Office PIA 2007 and Office PIA 2010. How to migrate to PIA 2010 for users who have Office 2007 office? I removed 2007 PIA and added 2010, checked on few clients Office 2013+ versions it's working. But on Office 2007 add-in doesn't load same as on my dev computer. But I'm receiving 0 errors on VS and can see iRibbonUI -> ActivateTab. On computer with office 2007 tried to install PIA 2010 but that doesn't helped.
Problem:
I'm using Visual Studio 2010, .NET 3.5 and Office 2007, can't find way to select my own created tabs maybe it's related to office version installed?
In VBA Excel library lists if i select "Office" -> "iRibbonUI" i get only "Invalidate" and "InvalidateControl", i checked this on Office365 - i get a lot more "ActivateTab" "ActitaveTabMso" and so on. In VS when I try to use "ActiveTab" i get error "Microsoft.Office.Core.IRibbonUI" does not contain definition for "ActiveTab".
Maybe I'm missing something? I can't change to higher office due i need soft be able run on Office 2007+.
Any replies appreciate
Not sure what you have tried but you could choose a tab as follows:
Globals.Ribbons.Ribbon1.RibbonUI.ActivateTab("yourtabname")
If you find this useful and want more tips and how-to's, you could also register for my course on udemy
I need to create a custom Excel 2010 ribbon (document level).
I have no Visual Studio, but have Visual C# 2010 express
If this is possible, please give me some gudelines.
You can customize the ribbon in Excel or any Office application without using Visual Studio, instead using a combination of XML and VBA.
A good starting-point for customizing the ribbon: http://msdn.microsoft.com/en-us/library/office/aa338202%28v=office.12%29.aspx (The title says Office 2007 but it will work for Office 2010 as well)
There is a free application that helps you design and validate the XML to modify the ribbon called the "Custom UI Editor For Microsoft Office": http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2006/05/25/customuieditor.aspx
Actually you have Visual Studio, but Express Edition and it shouldn't make any difference at this point ;)
I don't get your point about "Excel 2010 ribbon". I think that this is handled by Excel 2010 and it's part of User Interface of Office 2010, so if you open any Excel file in 2010 version you'll get ribbons. You can customize Office 2010 Ribbon and creating Excel files can be done in a lot of different ways i.e. using OpenXML, Microsoft Office Interop. Each has advantages and disadvantages.
I have developed an excel addin using VSTO in C#.net .Now i want to deploy this addin in other machines too .So that users who installed this can see my addin in excel menu -> Addins-> MyAddin
Alternatively can i give them just Excel with myaddin.So that whoever has this Excel can access addin and use it.This way they don't see myaddin in every excel file addins menu.
You can use a Visual Studio 2010 setup project to create a Windows Installer package. See this MSDN Link
Quote from that Link
Summary: Learn how to deploy a Microsoft Visual Studio Tools for the
Office system 2010 add-in or document- level solution using a Visual
Studio 2010 setup project to create a Windows Installer package that
targets the 2007 Microsoft Office system or Microsoft Office 2010.
Wouter van Vugt, Code Counsel
Ted Pattison, Ted Pattison Group
This article was updated by Microsoft with permission from the
original authors.
Applies to: Visual Studio 2010 Tools for Office, 2007 Microsoft Office
system, Microsoft Office 2010, Visual Studio 2010.
Download: http://code.msdn.microsoft.com/VSTO2010MSI
Contents
Overview
Deployment Methods
Deploying Office solutions that target the Visual Studio 2010 Tools for Office runtime
Download Samples Provided with this Article
Creating a Basic Installer
Conclusion
Additional Resources
About the Authors
EDIT
You may also see this link for All Users.
Conceptually, all you need to concentrate on is get yourself a COM object created which must be running even when the application (MS Excel here) is not open in the explorer.
More can be figured out from the following link :
http://www.codeproject.com/Articles/7859/Building-COM-Objects-in-C
(P.S : link is for c# not c).
Next you should give your users a .exe file including code to create the COM object.
I have a solution in VS2010 that was developed as an Excel 2007 add-in. Unfortunately something happened with my profile and since then VS runs the solution with Excel 2010. Somehow my profile got corrupted and my VS solution got corrupted too changing the Office library from 2007 to 2010. I tried changing the library back to 2007 but every time I open the VS solution VS changes it. Anyone has an idea how to fix this problem?
You must have installed Office 2010 which forces VS.NET to use the Office 14 PIAs. You can still deploy your add-in to Office 2007, you just have to be sure you don't use any Office 2010 specific features.
Also see related SO post .
How do I develop addin for MS Outlook that works with all
1. Outlook 2010
2. Outlook 2007
3. Outlook 2003
I have developed addin that works well with 2010 and 2007 BUT NOT with 2003.
I want something like this that works well with all the above three :)
You need VSTO (Visual Studio Tools for Office). Here is an article to get you started.
You can also check out Office Development Center.
You need to go for NetOffice.
It will allow you to abstract out from Outlook version.
Also it has a powerful diagnostic tool that will tell you which version of outlook your add-in is compatible with based on API features you use in your code.
Worked nicely for me.
http://netoffice.codeplex.com/