Is Office 2007 PIA deployment possible without Office 2007?

烂漫一生 提交于 2019-11-28 10:26:41

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.

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.

note: you can generate docx (word 2007) files without office.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!