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

Free Support Forum - aspose.com

Word Parsing Code Samples

Hi,


Are there any complete code examples of how to parse a Word document?

I know the docs have references here and there, but I’m interested in a complete example that goes line by line and extracts the text, basic formatting (bold, underline, italics), etc.

Thanks,
Akbar

Hi Akbar,

Thanks for your interest in Aspoe.Words.

Sure, we have a similar example in the documentation here which uses DocumentVisitor to "visit" all the content in the the document and append it to a string. I believe this is the base method you would use to achieve what you are looking for, you could then add in some calls to the Font classes to extract the formatting. If you could share some further details we will be happy to assist you further.

Thanks,