Thursday 29 December 2011

Reading word document using openXML

        //************************Reading word document using openXML**********************

        string strFilePath = @"d:\rentFormat1.docx";
        using (WordprocessingDocument myDocument = WordprocessingDocument.Open(strFilePath, true))
        {
            Body body = myDocument.MainDocumentPart.Document.Body;
            string strBody = body.InnerText;
        }

No comments:

Post a Comment

Please Give Your Valuable Comments on this Topic