How can I genarate Word document

I’m using a web Application with C#, How can I generate a word document using Aspose.Words and C#?

Thanks for help.

Hi,

There is a demo project with source included in the product installer, you can start from there. Also, there are code examples in the API documentation, see Document class and its methods to start.

Let me know if you have more specific questions.

I have installed aspose.word for demos.
But if I do start/program/aspose.word/Aspose.word.demos project I have this error :Cannot open the prject Web’Aspose.Word.demos’ the directory c:\program files \aspose\Aspose.Word\Demos\Aspose.word.demos does not correspond to the URL http://localhost:/Aspose.word.demos.
The two directories must reference to the same server directory.
Error HTTP 404 Object not found.

Note that my Visual Studio is in french, I have translated the message error in english.

VS.NET errors for web projects are annoying and hard to help resolve remotely.

If you cannot run the whole demo project, just see inside the .cs files, you can copy and paste the code into your project.

Also, here are some documentation link that contains examples:
https://reference.aspose.com/words/net/aspose.words/document
https://reference.aspose.com/words/net/aspose.words/saveformat
https://reference.aspose.com/words/net/aspose.words/documentbuilder

Look through the doc, it can’t be that bad so you cannot use the component.

Thank you, I have copied the examples in my project (my c# web project in Visula Studio) but I have too many errors.
I have installed the version evaluation of aspose.word.

In the code of the examples I have not seen any using.
I would like to know if I need a using or a reference to use classes like DocumentBuilder or Document.

Thank you for help.

Ok, if that does not help, tell me exactly what you want to achieve and I will try to tailor an example just for you.

Thank you,
I want to generate a word document from a C# web application.
The code must fill the word document by data coming from a database,
I want the document to be viewable, savable and printable from the internet explorer. Is this possible by Aspose.Word ? I know that this is possible by Office.

Have you any documentation?

if I do this selection for 414 USD :

Product : Aspose.Word

Limitation : Limited

Edition : Professional

Devel Machine: One

Platform Web

Deployment Web Platform only

It is suffisant for me to do what I want ?

  1. Using MS Word insert merge fields into the document you want to populate with data.

  2. See documentation for MailMerge and MailMerge.Execute and examples in this documentation:
    https://reference.aspose.com/words/net/aspose.words.mailmerging/mailmerge
    https://reference.aspose.com/words/net/aspose.words.mailmerging.mailmerge/execute/methods/5

  3. Save the document to the Response object so it is send to the client browser like shown in this example:
    https://reference.aspose.com/words/net/aspose.words.document/save/methods/5

To view, print and save the document on the client machine the user needs MS Word or MS Word Viewer installed.

The license options you’ve shown seem correct for what you want to do.