Click here to Skip to main content
11,640,788 members (61,300 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: selection Word insert
Im seeking to make application that archiving word documents
I face a problem in searching the content of those files on aspecefic text , so i decieded to insert the files in database , where each page will be arecord in atable have the name of the decument.
i can read from the document file, but in need to select each page and insert them in a table.
 Dim word As New Microsoft.Office.Interop.Word.Application
        Dim doc As Microsoft.Office.Interop.Word.Document
            doc = word.Documents.Open("C:\Users\Public\Documents\Search Engine Optimization.doc")
            ' word.WindowState = word.WdWindowState.wdWindowStateNormal
            '  word.Visible = True

            doc.ActiveWindow.Selection.SetRange(0, 2060)
            Dim data As DataObject
            data = Clipboard.GetDataObject()
            RichTextBox1.Text = data.GetData(DataFormats.Text).ToString()
            ' doc.Range.InsertAfter("Text Added at " & TimeOfDay.ToShortDateString)
        Catch ex As COMException
            MessageBox.Show("Error accessing Word document.")
        End Try
i used this code to read , i need a help for select each page recursevily!
Or Code for searching multible files contents?
Posted 26-Feb-12 22:20pm
ryanb31 at 27-Feb-12 8:22am
Refer to on how to search through multiple files.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Mika Wendelius 380
1 OriginalGriff 205
2 DamithSL 153
3 CPallini 125
4 Afzaal Ahmad Zeeshan 124
0 Mika Wendelius 370
1 OriginalGriff 205
2 CPallini 125
3 DamithSL 105
4 Afzaal Ahmad Zeeshan 70

Advertise | Privacy | Mobile
Web02 | 2.8.150731.1 | Last Updated 27 Feb 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100