Printing Attachment in $File with Script

I have a Lotus script I created that, in a view/folder a user can select multiply emails, then they run the agent and it would print, extract, move the email to folder…but this only works within the Body field. This is using rtitem.embeddedobjects. How can I do the same but working with the attachments that are located in the $file field?

Any help would be greatly appreciated. Thanks!

Subject: Possible solution

Take a look at the code in the following linked page. And be sure to read the comments as well.