Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Extracting text from WORD files

Expand Messages
  • hugo_paulissen
    Robin, Larry, I had to do this for a couple of hundred of files once. What follows is a very quick and dirty clip (warning!), which opens the documents in Word
    Message 1 of 7 , Oct 14, 2003
    • 0 Attachment
      Robin, Larry,

      I had to do this for a couple of hundred of files once. What follows
      is a very quick and dirty clip (warning!), which opens the documents
      in Word (one at a time), and copies the text to NoteTab. The document
      is then saved with the same name plus a txt-extension... If all files
      are processed the clip should stop.

      Please note that you should have Word open - and that there should be
      no document loaded in Word before you start the clip. (This can be
      fixed by changing the FocusApp line...); the following clip assumes
      the title bar of MS Word only shows Microsoft Word.

      Hugo

      ^!Set %path%="C:\WINDOWS\Desktop\OutlookFiles"
      ^!SetArray %Files%=^$GetFiles("^%path%";*.doc)$
      ^!Set %X%=1
      :EXPORT
      ^!If ^%X% > ^%Files0% END
      ^!FocusApp "Microsoft Word"
      ^!Delay 1
      ^!Keyboard CTRL+O
      ^!Delay 1
      ^!Keyboard #^%Files^%X%%# ENTER
      ^!Delay 1
      ^!Keyboard CTRL+A CTRL+C CTRL+W
      ^!ActivateApp
      ^!Select ALL
      ^!InsertText ^$GetClipboard$
      ^!Save AS "^%Files^%X%%.txt"
      ^!INC %X%
      ^!Delay 1
      ^!GoTo EXPORT
    • Don Passenger
      That does what I said, only it has notetab code in it ;-) -- Don Passenger
      Message 2 of 7 , Oct 14, 2003
      • 0 Attachment
        That does what I said, only it has notetab code in it ;-)

        --

        Don Passenger
      Your message has been successfully submitted and would be delivered to recipients shortly.