set theItems to {} set x to 0 repeat until (count of theItems) > 1 set theItems to choose file with prompt "Select two or more Word documents." with multiple selections allowed without invisibles if (count of theItems) < 2 then display dialog "Please select at least two Word documents." buttons {"OK"} default button 1 end if end repeat set theItems to only_doc(theItems) -- check files type set theItems to reverse of ASCII_Sort(theItems) -- sort files alphabetically tell application "Microsoft Word" activate make new document repeat with aFile in theItems tell application "Finder" set fileRef to ((a reference to file aFile) as string) end tell insert file at text object of selection file name fileRef if x < ((count of theItems) - 1) then insert break at text object of selection end if set x to x + 1 end repeat end tell on only_doc(my_list) set cleanList to {} repeat with i from 1 to count my_list if (kind of (info for file ((item i of my_list) as string))) = "Alias" then tell application "Finder" to set filetype to type identifier of (info for file (original item of alias ((item i of my_list) as string) as text)) else set filetype to type identifier of (info for file ((item i of my_list) as string)) end if if filetype = "com.microsoft.word.doc" then set cleanList's end to my_list's item i end if end repeat return the cleanList end only_doc on ASCII_Sort(my_list) set the index_list to {} set the sorted_list to {} repeat (the number of items in my_list) times set the low_item to "" repeat with i from 1 to (number of items in my_list) if i is not in the index_list then set this_item to item i of my_list as text if the low_item is "" then set the low_item to this_item set the low_item_index to i else if this_item comes before the low_item then set the low_item to this_item set the low_item_index to i end if end if end repeat set the end of sorted_list to the low_item set the end of the index_list to the low_item_index end repeat return the sorted_list end ASCII_Sort