Get Mail Attachment, The Rename with Subject Line

I am having a rather vexing problem that seems like it should be so simple.
I am trying to simply take a mail attachment that comes in, move it to another mailbox, then copy to a folder in the finder. Once there, I'd like to rename the attachment with the first word or two (or x characters) from the subject line (subject line always starts with "Insert Order" ) then date and time stamp it. I have the date and time stamp thing down, but can't figure out how to get the subject line over when renaming. Basically, I am trying to automatically get file attachments downloaded and renamed. Can you help?
I am trying to simply take a mail attachment that comes in, move it to another mailbox, then copy to a folder in the finder. Once there, I'd like to rename the attachment with the first word or two (or x characters) from the subject line (subject line always starts with "Insert Order" ) then date and time stamp it. I have the date and time stamp thing down, but can't figure out how to get the subject line over when renaming. Basically, I am trying to automatically get file attachments downloaded and renamed. Can you help?