Free Support Forum - aspose.com

Some Doubts

Received : 2007/10/29 11:12:02
Message : Hi,i have an xml and i need to convert it into word in .net . So i need to know how to do it?. I need assistance regarding it


This message was posted using Aspose.Live 2 Forum

Hi

Thank you for your interest in Aspose products. Aspose.Words supports WML format. You can load WML files and save these files in any supported formats.

- Microsoft Word (DOC)

- Microsoft Office Open XML (DOCX)

- Rich Text Format (RTF)

- WordprocessingML (XML)

- HTML and XHTML

- Plain Text (TXT)

You should use the following code to achieve this.

Document doc = new Document(@”MyDocument.xml”);

doc.Save(“out.doc”, SaveFormat.Doc);

I hope that this will help you.

Best regards.

hi, thank you for your support. is the input here is xml?. when i try this one, i am getting an error that unknown file format, when i give xml as an input. So, what to do,input xml and output word

Hi

I think that you should read your XML file to DataSet and then insert data into the document. You can use mail merge to achieve this. See the following links for more information.

How to prepare a template document

http://www.aspose.com/Products/Aspose.Words/Api/PreparingaDocument.html

How to perform mail merge

http://www.aspose.com/Products/Aspose.Words/Api/ExecuteSimpleMailMerge.html

http://www.aspose.com/Products/Aspose.Words/Api/ExecuteMailMergewithRegions.html

I hope that it will help you.

Best regards.

The input file here is WordprocessingML (XML).

Document doc = new Document(@”MyDocument.xml”);

Best regards.