I have a Com Add-in for Office 07,2010 created in VS 2008 , .net 2.0. implementing IDExensibility2 and IRibbonExtensibility.
Com Shim dll - C++
Rest all code -C#
I need to upgrade this project to Office 2013, i have read online that it doesn't require any change, the same com add-in should work properly for Office 2013.
I created solution files for office 2013 with office15 object library. The build was successful.
But when i deploy dll's and register the Com Add-in , it shows in active Add-ins but there is no log at all. (meaning Office is not even taking it up).
Not even Onconnection() is called.
Is there anything i am missing? Pls help
Related
I am trying to create an Office add-in, mainly for Word, that consists of a simple Task Pane that displays search results from a website. I need it to work in every version of office, as far back as Office 2010. So I have chosen to create it in VSTO, as that seemed to be the most backward compatible approach. My problem is I don't have Word 2010, 2013, 2016, 2019, etc, to test that the add-in works in them, nor do I have any idea of how to build the add-in for backward compatibility in the first place.
I've searched through countless tutorials, Microsoft docs, Stack Overflow answers. I'm stuck. I know it's technically possible because the Grammarly add-in works in Office 2007 thru 2021/365.
Is it even possible for a little dev like me to create an add-in for Word 2010 in 2022?
I am using Visual Studio 2021.
As far as I know Grammarly uses a shimmed COM add-in skeleton (most probably written in C++) which implements the IDTExtensibility2 interface. But VSTO does this for you out of the box by hiding all the complexity COM add-ins could have on board.
Is it even possible for a little dev like me to create an add-in for Word 2010 in 2022?
Yes, of course. It is not necessarily to create C++ COM add-ins, you can easily start creating VSTO add-ins for that. You just need to choose the right .net framework version for that.
The Run solutions in different versions of Microsoft Office article shows Office versions that can be supported by your add-in created with Visual Studio 2022 or earlier and target .net frameworks that can be used for that. Depending on the .net framework chosen you can support different ranges of Office application versions, in short.
The Visual Studio Tools for Office Runtime page lists the VSTO Runtime releases and the corresponding version of Office for which its support lifecycle follows. The Visual Studio 2010 Tools for Office Runtime (VSTO Runtime) ships with various versions of Visual Studio and Microsoft Office and follows the support lifecycle of the parent product. It is recommended that developers install the latest version of the VSTO Runtime with their applications. It will be supported when running with supported versions Office. If the VSTO Runtime needs to be serviced, only the latest version will be updated.
I'm new with the new web Addins.
I could create an Addin with the node yo generator and was able to show the Addin in the browser.
But if I try to get it to run within windows on my office 2013, it fails. I tried it on an other pc with office 2016 and I could get it to work.
(I could only find the configuration guide for 2016. Maybe it different to 2013 https://dev.office.com/docs/add-ins/word/word-add-ins?product=word)
yo office
https://github.com/OfficeDev/generator-office
In 2013 the Addin is still disabled. Should it not also work for office 2013?
Thanks
I have created an office addin for Word 2010 targeting .net 4 and this should apparently work in office 2007.
I have created the installer per this article with the exception that I include a dll in the dependencies rather than in the bootstrapper for the prerequisites.
The installer installs the vsto and the registry keys in
HKCU\Software\Microsoft\Office\Excel\Addins\ProjectName
The pc also has .Net 4 and the Office 2007 Primary interop assemblies.
The addin doesn't appear in Word 2007, any ideas where I could be going wrong?
UPDATE:
You have to sign your addin, this was pretty obvious! Office now recognises the addin but its gets a runtime error that I can't debug. Tried to debug with these steps with no luck!
Had to build for correct CPU version of office, in my case 32bit, Any CPU didn't work!
I have developed an application level add-in for Outlook targeting Outlook 2010 and .NET 4 and I want to run it on Outlook 2007, which should not be a problem due to the new "no pia" feature of .NET 4 (see this blog post).
However, after deploying the add-in with my Windows Installer package (the same package works for Outlook 2010), the add-in does not get loaded correctly and its load behavior is set to 2.
The test machine has the following software installed (in the given order):
Microsoft Windows XP with Service Pack 2 (x86)
Microsoft Office 2007 Enterprise
Windows Installer 3.1
Microsoft Windows XP Service Pack 3 (x86)
Microsoft .NET Framework 4.0 (Extended)
Microsoft Visual Studio 2010 Tools for Office Runtime (x86)
The utility assemblies are included in my deployment location and the add-in is registered correctly (shows up in Outlook trust center and deployment manifest is also included). I do not reference any third party libraries.
The strange thing is that the CLR 4 is not even loaded into Outlook, which I can see through the Visual Studio 2010 Remote Debugger. When I create an test add-in on my development machine and throw an exception on add-in startup, the load behavior also gets set to 2 on startup (without debugging), but at least the CLR 4 gets loaded into the Outlook process. Has anyone ideas what (probably missing dependency) could cause the VSTO 2010 Runtime to not load .NET Framework 4? I have also tried reinstalling VSTO which caused no effect.
Best Regards,
Oliver Hanappi
I found the solution on the msdn forums. There is a problem when no clr 2 is installed. A hotfix is required in this case. For more details see http://social.msdn.microsoft.com/Forums/en/vsto/thread/d95cc828-fdb9-4622-bf09-291a25cea81b.
Does Office 2007 PIA also require Office 2007 to be installed?
Can I deploy Office 2007 PIA with VSTO 3.0 (without having Office 2007 installed)?
EDIT: I have a windows application that generates MS Word files. I have added the Office 2007 PIA as custom pre-requisite in the setup, but Office 2007 PIA needs MS Office 2007 to be installed.
I just wanted to know that if VSTO does not require Office Installation, then maybe i can convert my application to VSTO.
In order to use VSTO you must have Office Installed. The VSTO PIA's only provide a shim between .NET and the COM interfaces that Office exposes. So the PIA's can do nothing w/o Office.
note: you can generate docx (word 2007) files without office.
What do you want to do with the Primary Interop Assemblies exactly? I think you need to clarify your question a bit.
If you plan on making any method calls to the Microsoft Office PIA DLLs without Office installed you can expect your code to blow up with a COMException when you run it since Office isn't there to inter-operate with.
If what you want to do is create Word documents without MS Word being installed then your best option is to use one of the available programs to do this. This is usually how Word/Excel documents are created on a web server for instance.
To generate MS Word documents we've used both Syncfusion DocIO (and XlsIO for Excel) and OfficeWriter and they have been much easier and literally 5 to 30 times faster in document generation than MS Word (depending on the complexity of the document). However, these tools are not free. I suppose it's theoretically possible to generate docx files manually (as hinted by Tracker1) but that would be a lot of work unless there are free libraries to assist in doing that.