Create Notes Mail with Stationery and Update attachment and link

I am using VBScript to access IBM Notes 9. I can search all documents in Mail or Board Server and save attachments to local folder, but I am not sure how to do something as below with underline, please give me some suggestion and sample code:

I have some templates in Stationery, I can read them by VBScript, now I want to use them to create new Mail, replace some text and embedded link, then send it.

After Saved attachment in a Board document to local folder and update it, I want to replace original attachment in same document then save this document to board.

How to save mail to Stationery as template?