Free Support Forum -

How to use Aspose.Words to open a Word document


I am trying to create a Word document using Aspose.Words. After creation of the Word document, does it make sense to open the document for the user to view? Most of the examples show the file being saved to disk.




<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can use Process.Start to open generated document in MS Word. For instance, see the following code:

//Save document

string fileName = @"Test137\out.doc";


//Open document in MS Word


If you would like just show document preview, you can save the document to image. See any of Aspose.Words demos and select “Rendering - View Document Pages as Images in the Browser

Also, you can use XPS to achieve the same:

Hope this helps.

Best regards.