Applescript to change subject line I have been looking up for the last two days and found a few applescripts that claimed to change the subject lines. But none of them seem to be able to change/set the subject line. What do you guys think the mistake is here?

tell application "Mail"
    set theSubjectList to {}
    set themessages to selection as list
    repeat with msg in themessages
        set thisSubject to (subject of msg as string)
        if thisSubject is not in theSubjectList then
            set theSubjectList to theSubjectList &amp; {thisSubject}
        end if
    end repeat

    set theNewSubject to ¬
        (choose from list theSubjectList with prompt ¬
            "Choose the subject of the merged thread…") as string

    if theNewSubject is in theSubjectList then
        repeat with msg in themessages
            set subject of msg to (theNewSubject)
        end repeat
    else
        display dialog "Action cancelled"
    end if
end tell


I get the following error

error "Mail got an error: Can’t set subject of message to \"CHANGED SUBJECT LINE\"." number -10006 from subject of message
The simple answer is that "subject" is read-only. Mail's Applescript dictionary shows:

subject (text, r/o) : The subject of the message


I would love to be able to combine messages into a thread, but I can't see how to change the subject without perhaps exporting and re-importing messages.