Hi, I am looking for a way to parse word docs into text files in the pocketpc environment, any ideas?
Thanks,Kyle
Printable View
Hi, I am looking for a way to parse word docs into text files in the pocketpc environment, any ideas?
Thanks,Kyle
This is how to output Word docs to a text file, not to sure about PocketPCs.
Dim oWord as Word.Application
Dim szWordDoc as string
Dim szTextFile as string
Dim i as Integer
Dim icount as Long
Sub main()
'*** szWordDoc to be the Word Document you want parse
'*** szTextFile to be the txt file
set oWord = CreateObject("word.application")
oWord.Documents.Open szWordDoc
icount = 1
Open szTextFile for Output as #3
for icount = icount to oWord.ActiveDocument.Paragraphs.Count
print #3, oWord.ActiveDocument.Paragraphs(icount).Range.Text
next icount
Close #3
oWord.Quit wdDoNotSaveChanges
set oWord = nothing
Don't forget to rate!!!!
Andy
Andrew Lennon (Berlitz)
Automation Dev Engineer
Wow, that is the simplest code i have seen yet to do this sort of thing. The only problem is that the Word object model is not exposed in Windows CE. Thanks a lot for your help though. Any other ideas???