We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word integration - Extract Word document format


I want to extract the formats used in a given word, to apply the same format in other documents.
Is there a way to extract the format in hierarchy?

Can I get the structure like in MS- Word command - DocumentMap from a given word document.



Thank you for your interest in Aspose.Words. In MS Word document formatting is applied on few levels. For example, let’s consider formatting of text. Text in documents is represented by Run element and Run is inside Paragraph. See document object model for more information:
You can apply Paragraph Style to Paragraph node and Glyph Style to Run node, moreover, you can apply direct formatting of text by Run attributes. Finally run will inherit formatting of Paragraph Style, Glyph Style and direct formatting.
You can get formatting and styles using node’s attributes.
However, in your case, I think, you should use template, where you define all necessary styles and use this template to build new documents.
Best regards.