Free Support Forum - aspose.com

How to get Document object from Table object using .NET

I have recently started using the latest version of the aspose code,

My old code was with a version of aspsoe that was before DocumentBase existed and I have lots of code like this:

var builder = new DocumentBuilder(table.Document);

Previously table.Document pointed to the Document object itself but now it is DocumentBase.


How should I update my code?

@dagada1

Thanks for your query. You can cast table.Document to Document object as shown below. Please check the Aspose.Words documentation for details. Please let us know if you have any more queries.

Document doc = (Document)table.Document