I want to build an excel add-in which is application level. I followed the instructions to create a project on MSDN.
I don't want to create a COM add-in, I want an Excel plugin. The plugin we create as .xlam file and code it in VBA.
Please suggest me what to do. How to deploy the .vsto file and patch up with the .xlam file?
A VSTO Office add-in is a COM add-in by definition. That is how Microsoft implemented it. They have built a bridge from .NET to the native Microsoft Office code using COM.
If you want an XLAM add-in, as you say, you need to go through this reference, which doesn't involve creating a Visual Studio VSTO project.
Related
I am trying to revamp lots of word templates from VBA (.dotm) to C# using VSTO & Visual Studio.
My question is if its possible to deploy multiple word templates with one VSTO installation or bundle so the user does not has to install VSTO for every template?
There are two kinds of VSTO add-ins for Word - application-level and document-level add-ins. The Application level add-ins are not specific or linked to any document, they are installed for the application, not document. So, if you consider creating an application-level add-in for Word you may include any number of templates to the add-in. And there is no need to create a document-level add-in for each of them. See Walkthrough: Create your first VSTO Add-in for Word for more information.
For document-level add-ins, see Walkthrough: Create your first document-level customization for Word.
I need a help to understand VSTO addin vs the .xll excel addin .
what is the difference between both addins?
Is there any possibility to convert VSTO excel addin into a .xll file to directly attach in an excel worksheet?
XLL Add-ins
XLL add-ins are the older native-code add-ins created via the Excel Software Development Kit. These add-ins are written in c/c++ and make use of COM interop.
VSTO Add-ins
Visual Studio Tools for Office (VSTO) add-ins are the contemporary method to create Excel add-ins via managed code such as C#. Microsoft provides a managed API instead of raw COM to access Office products including Excel.
OP:
Is there any possibility to convert VSTO excel addin into a .xll file to directly attach in an excel worksheet?
Yes and no. You would need to re-write the add-in not just to use c/c++ instead of .NET but also to use the COM API instead of the VSTO managed libraries. Sadly there is no easy way to do this.
I have Office Excel add-in project and it's working, but it generates only DLL files, not XLL. Is there any possibility to create XLL file using only Visual Studio without using external libraries (ex. Excel-DNA)?
i've created an word 2010 Add-in with the VS 2012 word Add-in template and ribbon designer component.
It is possible to use this plugin in other office products, like Excel or Outlook if I add the other interop dlls?
How can I differ which office product (word, excel or outlook) actually is used to run differnt code segments in the add-in?
Or must I create for each an own plugin with own ribbon!?
Please give me some hints.
Regards
If you link statically to the Office Interop assemblies, then you will need to build a different version for each Office version you plan to support. A much better alternative I would recommend you investigate is to use NetOffice, which provides the Office API in a version-independent form:
http://netoffice.codeplex.com/
We need to create a VSTO add-in in C# that supports both Outlook 2007 and 2010.
To start off we created 3 projects:
File->New Project->Office->2007->Outlook 2007 Add-in
File->New Project->Office->2010->Outlook 2010 Add-in
File->New Project->Windows->Class library
All shared code is in project #3.
So far, we have partially developed the add-in and have been using ClickOnce deployments for testing.
One day, we noticed someone installed the 2010 add-in for 2007 Outlook and had no ill effects whatsoever.
So a few questions:
Is there any reason to create the
2007 VSTO project? Can we just
create the 2010 project?
Or is the only difference the version of
the office runtime that is
bootstrapped by the ClickOnce
installer? Can you just install the 2010 runtime for Outlook 2007?
If there is no difference, why are
there two Visual Studio project
templates?
In our final solution, we will be using a WiX installer, which is also working thus far. The WiX installer will be simplified greatly if we can use 1 project for the add-in.
Is there any reason to create the 2007 VSTO project? Can we just create the 2010 project?
You can just use the 2010 project, but if you accidentally reference any 2010 ONLY api's, for example accessing any of the new conversation API's will cause your add-in to blow up in 2007.
Or is the only difference the version of the office runtime that is bootstrapped by the ClickOnce installer? Can you just install the 2010 runtime for Outlook 2007?
Basically you are writing a VSTO 3.0 add-in, which works for both 2007 and 2010. VSTO doesn't actually care which template you are writing for, only that your add-in is a VSTO 3.0 add-in.
If there is no difference, why are there two Visual Studio project templates?
2 reasons that I can see, F5 debugging support, and to make sure you do not access a new API'
If you do go down the only 2010 add-in road, I suggest you do a compile of the solution against the Microsoft.Office.Interop.Outlook v12 PIA which will show you any new API's that you are accessing. If you do want to target some of these new API's only IF your add-in is hosted in 2010 then have a look at http://blogs.msdn.com/b/vsto/archive/2010/06/04/creating-an-add-in-for-office-2007-and-office-2010-that-quot-lights-up-quot-on-office-2010-mclean-schofield.aspx