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
Related
While using Visual Studio 2013/C# to create Excel automation ... I have both Office 2010 and Office 2013 on my machine. How do I create an add-in that will install into Excel 2010 or on another case install into 2013, my choice. Will creating a new 2010 or 2013 add-in project do the trick or do I have to configure something to steer it to one or the other? Thanks
You have to create an add-in per version of Office you wish to target. i.e. one for 2010; another for 2013 and so forth. The Office types used in each add-in are locked to that version of office. COM and Automation does allow you to create objects from version-independent PROG IDs but that's another story.
However if done right, you could abstract out some of your core code to be shared across Office installations.
I have an addin that is compatible with Outlook 2003 - 2013 by using the various versions of VSTO.
It seems that the majority of small businesses will have the Click To Release version, which is not compatible with addins.
Is there a way to make an addin compatible with 2013 C2R, or does it need to be rewritten to be an "App" using Napa?
C2R Office installation load COM addins in exactly the same way as the regular version of the Office, there is nothing you need to do.
What is the exact problem that you are running into?
I am currently in the process of re-writing some VBA macros that were written for office 2003. I was wondering if I wrote a C# add-in for 2007, if it would work for 2010 or maybe even 2013. Or if I wrote them for 2010 if they would work for 2007 and 2013 as well. I currently have access to 2007 but I could get access to 2010 if need be, no 2013 yet.
So, basically, how much does the version of office affect the plugins?
If you use Visual Studio Tools for Office 2010 (VSTO 4.0) then it will compatible for Office 2007 ,Office 2010 and with Office 2013.If you use earlier version other than the above then you can use that only for particular office versions only.As a example VSTO 3.0 only supports office 2003 and 2007 as shown below table.
For more information check this out Visual Studio Tools for Office and Visual Studio 2010 Tools for Office Runtime
compatibility Shows like below:
I hope this will help to you.
you can take a look at Netoffice, a wrapper for MS Office that enables you to create Addins for all supported versions of MS Office. You don't need VSTO and you can check within your own code which version of Office your AddIn is running in.
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/