Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'How to retrieve text from Windows Office 2007 Word docs' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
How to retrieve text from Windows Office 2007 Word docs
Authored by: ctierney on Fri, Dec 8 2006 at 11:45AM PST
Here's a droplet that'll extract plain text to the clipboard:
on open this_item
   set docxPath to POSIX path of this_item
   try
      do shell script "unzip -p " & docxPath & " word/document.xml | perl -pe 's/<[^>]+>|[^[:print:]]+//g' | pbcopy"
   end try
end open

on run
   display dialog "Drop a docx file on this applescript and it's plain text contents will be copied to the clipboard." buttons {"Ok"} giving up after 10 default button 1
end run


[ Reply to This | Parent | # ]