|
-
March 28th, 2002, 01:44 AM
#1
parse word .docs
Hi, I am looking for a way to parse word docs into text files in the pocketpc environment, any ideas?
Thanks,Kyle
-
March 29th, 2002, 08:00 AM
#2
Re: parse word .docs
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
-
March 29th, 2002, 01:31 PM
#3
Re: parse word .docs
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???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|