Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing of Data from MS WOrd 97 /2000 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi , just found your site through Google ! Helpful , but i want to extract data from a word document and the problem is that within the document the data is not divided by pages or anything it is in a format such as:


Name:98798798798 Address:1212
Company:09809808 Date 1/1/1 Total amount:1212121

Invoice Date Value
1231 1/1/1 123
5666 8/8/1 565
12312 2/2/1 21321

Name:11111111111 Address:111
Company:21223232 Date 123123 Total amount:199999

Invoice Date Value
1231 1/1/1 222
5666 8/8/1 222
12312 2/2/1 222

and so on and so on :) but i need to bring this into Access 97 and display in forms with header details and below that the individual invoices ........ any help??
 
Hi, With this sub you can move in the Document and read Line By Line.

Its a start.

Sub MoveThroughDoc_LineByLine()
Dim iCountOfLines As Integer
Dim iCounter As Integer
Dim fdWord As String

' Move the insertion point to the beginning of the document.
Selection.HomeKey Unit:=wdStory, Extend:=wdMove

' Loop number of lines in document.
iCountOfLines = ActiveDocument.BuiltInDocumentProperties("NUMBER OF LINES")

For iCount = 1 To iCountOfLines 'Iterate through each line in the document
' Select a line.
ActiveDocument.Bookmarks("\LINE").Select
' Display line number.
MsgBox "Line: " & iCount
' Move to next line.
Selection.MoveRight Unit:=wdCharacter, COUNT:=1, Extend:=wdMove
Next iCount
End Sub Best Regards

---
JoaoTL
NOSPAM_mail@jtl.co.pt
 
Hi Jao TL , i didnt realise i had a Handle already , I am SAMGalway2001 ,.

thanks for the info , open question , how do i point it to the word document? is it different if its word 97.

Uve put me one the right track im sure but i need to parse the data and have the header information in a form with the invoice stuff below , im learning and im only looking for pointers, whatever you can help with would be great!:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top