Word 2007 documents in Visual Studio 2010

I am currently using Visual Studio 2010 Professional and notice the ability to create Word 2007 and Word 2010 documents as add-ins from C #.

What I want to do is fill out a document type report with the information in my C # application, and then output the final .docx file. Is it possible using this function, and how can I do it?

+3
source share
2 answers

What you see is called VSTO ( Visual Studio Tools for Office ). This is a way to create and manage add-ons, templates, and documents created by the client (or, like some others, just manage the client for certain operations). This is due to a large amount of overhead.

It looks like you want the Open XML SDK 2.0 instead . This will provide full access to the creation of Word documents (and other Office) without any requirements for the Word client or VSTO requirements (VSTO runtime, Primary Interops, etc.) for the program or operating system that creates them. There is a lot of information in the OpenXML SDK - http://www.openxmldeveloper.org is a good starting point . Another, how-to video.

+6

,

MS Word Content Control . , BookMarks ( , , ).

- , , Word 200, #, ASP.Net( )

+1

Source: https://habr.com/ru/post/1747432/


All Articles