Hi there, I'm working on a Email Template maker for part of my contact database. I have a working prototype that will work but for any additional merge fields will involve a lot of editing in multiple places. Right now users can create a new Email Body which they can add merge fields (using a list box) which is based off a table i've created with 3 Columns ID, MERGEFIELDS and EXAMPLES.
1 | %FIRSTNAME% | John
2 | %LASTNAME% | Abraham
The preview involves me having to use the Replace function but it has to be maintained each time another merge field is added. I use the following code in a Textbox control.
Here's a little snippet of what I'm working with.
2 Questions: Is there a way of replacing the fields faster (through the use of a current recordset, and or table?)
Is there a way of converting the HTML codes to preview as a HTML style in the preview?
Thank you for any help, links, or guidance.
1 | %FIRSTNAME% | John
2 | %LASTNAME% | Abraham
The preview involves me having to use the Replace function but it has to be maintained each time another merge field is added. I use the following code in a Textbox control.
Code:
=Replace(Replace(Replace(Replace([EmailBody],"%FIRSTNAME%","John"),"%LASTNAME%","Abrahams"),"%STAFFID%","abrahamsj"),"%MONTH%","December")
Here's a little snippet of what I'm working with.
2 Questions: Is there a way of replacing the fields faster (through the use of a current recordset, and or table?)
Is there a way of converting the HTML codes to preview as a HTML style in the preview?
Thank you for any help, links, or guidance.