Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get text from Word (MS Office) window or file
#2
This makes for a great member function:
Member function str.WordText
Code:
Copy      Help
function ~WordDoc
;EXAMPLE
;
;str Text.WordText("$documents$\document.doc")
;out Text

typelib Word {00020905-0000-0000-C000-000000000046} 8.0
Word.Document d._getfile(_s.expandpath(WordDoc))
Word.Range r

;get all text
r=d.Range
this=r.Text


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)