API / Custom - HEELP!

I am trying to insert a letter template into a rich text field so depending the type of letter the user selects it shows the letter populated with the fields value, any idea on how to this?

_______________

{EMAIL}
{EMAIL 2}
{EMAIL 3}

{NAME}
{COMPANY}
{ADDRESS}

Ref : {CLIENTE} vs. {DEBTOR}
File # {CASENUMBER}
Balance: {BALANCE} {CURRENCY}

Dear {NAME},

The above claim has been placed with us for the purpose ........

Thanks ! For your suggestions. We merge it could be expensive if you need to make hundreds of pages, but we will consider it if the text combo or equation fields don’t work… Thanks again.

What about using Webmerge, you can format the merge fields and layout in your document and create “if statements” or create a number of print buttons. It can download documents and email them.

What if you use the Text Combo or text equation feature? I've tested it and you can use some basic HTML tags inside of it.