Creating a simple Table in Word

Hi, I’m new in aspose.word, so I have some starting problems with it.
I just want to insert a Table with a few columns and rows into a word document, which I save as .pdf file.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToDocumentStart();
Aspose.Words.Tables.Table table = new Aspose.Words.Tables.Table(doc);
builder.CurrentParagraph.AppendChild(table);

At this point I get the Exeption “Cannot insert a node of this type at this location”

Unfortunately I have no idea where the problem could be…
thx,

Hi

Thanks for your inquiry. Please follow the link to learn how to insert a table into the document
https://docs.aspose.com/words/net/document-builder-overview/
Also, please use the following code to convert your document to PDF

Document doc = new Document(@"Test009\in.doc");
doc.SaveToPdf(@"Test009\out.pdf");

Best regards,