A few notes and then the script;
The text copies without font and size info. There are possibilities to capture this info and send it to TextEdit, but none that were easy. I may have missed something, but the final solution was to offer the user a choice of font and size for the entire document.
The order the files process in is going to be a big deal. They need to be in alphabetic order (use list view) for processing. If the files are not arranged this way they will need to be (for a thousand docs that would be a whole other script).
MS Word docs to TextEdit “rtf” document:
property FontList : {"American Typewriter", "American Typewriter Light", "American Typewriter Bold", "American Typewriter Condensed", "American Typewriter Condensed Light", "American Typewriter Condensed Bold", "Arial", "Arial Italic", "Arial Bold", "Arial Bold Italic", "Arial Black", "Arial Narrow", "Arial Narrow Italic", "Arial Narrow Bold", "Arial Narrow Bold Italic", "Arial Rounded MT Bold", "Baskerville", "Baskerville Italic", "Baskerville SemiBold", "Baskerville Bold", "Baskerville SemiBold Italic", "Baskerville Bold Italic", "Big Caslon Medium", "Brush Script MT Italic", "Comic Sans MS", "Comic Sans MS Bold", "Copperplate", "Copperplate Light", "Copperplate Bold", "Courier New", "Courier New Italic", "Courier New Bold", "Courier New Bold Italic", "Didot", "Didot Italic", "Didot Bold", "Futura Medium", "Futura Medium Italic", "Futura Condensed Medium", "Futura Condensed ExtraBold", "Geneva", "Georgia", "Georgia Italic", "Georgia Bold", "Georgia Bold Italic", "Gill Sans", "Gill Sans Italic", "Gill Sans Light", "Gill Sans Light Italic", "Gill Sans Bold", "Gill Sans Bold Italic", "Herculanum", "Lucida Grande", "Lucida Grande Bold", "Marker Felt Thin", "Marker Felt Wide", "Optima Regular", "Optima Italic", "Optima Bold", "Optima Bold Italic", "Optima ExtraBlack", "Papyrus", "Trebuchet MS", "Trebuchet MS Italic", "Trebuchet MS Bold", "Trebuchet MS Bold Italic", "Verdana", "Verdana Italic", "Verdana Bold", "Verdana Bold Italic", "Zapfino"}
property SizeList : {"12", "14", "16", "18", "24"}
set theFolder to choose folder with prompt "Select target folder"
set the_font to (choose from list FontList with prompt "Select the font" default items item 1 of FontList)
set the_size to (choose from list SizeList with prompt "Select the type size" default items item 2 of SizeList) as number
tell application "Finder" to set theDocuments to files of theFolder
tell application "Microsoft Word" to launch
repeat with ThisFile in theDocuments
tell application "Microsoft Word"
open ThisFile
delay 1 --May need to adjust how long it takes to open file
set this_data to text of document 1
close document 1
end tell
set Filename to "TestFile" --Name the file
set target_file to (path to desktop) & Filename --You can eliminate "Filename" as a variable and type the filename as part of the path (if you wish) but you need a full path
set append_data to true --Set this to false if you want to overwrite, true if you want to add text to an existing file
try --This part writes the file to an appending text file
set the target_file to the target_file as text
set the open_target_file to open for access file target_file with write permission
if append_data is false then set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
on error
try
close access file target_file
end try
end try
end repeat
set FinalData to read alias target_file
tell application "TextEdit"
try
quit --Avoids errors if TextEdit is open
delay 1
end try
activate
save window 1 --Create and save blank "rtf" document
set text of document 1 to FinalData--Copy the text doc to rtf doc
set the font of text of document 1 to (the_font as string)
set the size of text of document 1 to the_size
end tell
SC