lunes, 8 de julio de 2013

Usando la libreria DocX en SharePoint Parte I - Creación de Documentos Word (DocX Library in SharePoint 2010 Part I - word document creation)

A excellent option to manipulate word documents is the DocX library, you have download, in the next link DocX Library. On a series of chapters I will show a easy form to manipulate this DLLL for their sharepoint projects.

In this first chapter, we will see how make a Word document using this library and saving it in a sharepoint library


1. We must have our own document library in a sharepoint site, in my case I create a library called DocxDocumentos and only verify that this is a Word template


2. In our Visual Studio solution, create our Visual Web Part with the title DocxNuevoElemento.


3. On the design view add a texbox and one button, as seen on the next image,


4. In our project, add a new reference, in the browse section search and add our dll.


5. Add our name space.



6. Now... write, the next code in a click event


7. It's necesary to add  our DocX.dll on the bin folder, before to run.



8. run our code and to load the page add our webpart


9 Placed in the Textbox "Primer Documento" (First Document) and then click on the button. Now, we can see the document in our library.



10. If you open the document we can see a paragraph.


In this manner we can see to Word document creation it's very easy. In the next chapters see all the benefits of this library.

Saludos.
Oscar Miguel Dominguez Acevedo.

No hay comentarios:

Publicar un comentario