Facebook

Reading Doc and Docx using .Net

There is no open source doc and docx reader. So you could use richtextbix for reading doc and docx reader.

Code for reading doc and docx file:

            RichTextBoxPrintCtrl1.Text = “”

            Try

            Dim wd As New Word.Application

            With wd

                .Documents.Open(Path)

                .Selection.WholeStory()

                .Selection.Copy()

                RichTextBoxPrintCtrl1.Paste()

                .Quit()

            End With

            wd = Nothing

Catch ex As Exception

             MsgBox(“Don’t give frequent commands.”)

           End Try

For this you need 2 name space

 Microsoft.Office.Tools.Word

 Word

Move to solution page.

You could download this dll pack from here

Leave a Reply

Your email address will not be published. Required fields are marked *