PDA

Click to See Complete Forum and Search --> : [1.0/1.1] How to get formatting of MS Word document?


bona
Nov 2nd, 2006, 03:16 PM
Is it possible, to read MS Word document from .NET and get documents’ formatting, e.g. fonts used, font styles, font sizes, etc.?

techgnome
Nov 2nd, 2006, 04:39 PM
YEs it is.... add a reference to the Word object model (Add Reference -> COM Objects -> Search for the Microsoft Word object.)

Then use simple automation to open the Word document. Loop through each paragraph in the document, and extract the formating information you need.

-tg

jmcilhinney
Nov 2nd, 2006, 05:31 PM
Lot's of information on Office Automation here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wroriautomatingofficeapplications.asp).

bona
Nov 2nd, 2006, 11:22 PM
Thanks.