Get Started With Spire.Doc To Make Fast and Valuable Applications

Get Started with Spire.Doc in Order to Make Fast and Valuable Applications

Introduction

You may have a project that requires Office Automation to automatically create, read and manipulate a Word document that calculates and prints the salary of an employee of a big company and you are ask for a fast and consistent solution.

Don't worry, Spire.Doc allows you to complete your application without wasting time or quality.

Background

Spire.Doc is a professional Word .NET library specially designed for .NET developers in order to create, read, write, convert and print Word Document Files from any .NET Platform fast and with a high quality performance.

Using the Code

We will type Hi..I'm Fred! in a Word document called "Fred.docx".

So the first step you need to do is downloading and purchasing the Spire.Doc from http://www.e-iceblue.com/Download/download-word-for-net-now.html.

Then, open your Visual Studio and create Application Console and name it what you like.


Left click on References under your project in the Solution Explorer Window and add these essential references to your project:


Now, it is time for including the following library:

Collapse | Copy Code

  1. using Spire.Doc;  
  2. using Spire.Doc.Documents; 

Then, we need to create a new document in which we need to make a new section and add a simple paragraph containing our message beloved and finally we will save our document as "Fred.docx".

Collapse | Copy Code

  1. Document doc = new Document();  
  2. Section section = doc.AddSection();  
  3. Paragraph p = section.AddParagraph();  
  4. p.AppendText("Hi I'm Fred!");  
  5. doc.SaveToFile("Fred.docx", FileFormat.Docx);  
  6. And you get the following result: 


Conclusion

As we saw together, Using Spire.Doc is very simple in a .NET Application and you can make consistent and valuable projects using this great library.

Up Next
    Ebook Download
    View all
    Learn
    View all