Hello,
Could you please try to use the
IssueHelper.ResolveMacros method, as you can see in the following code snippet:
object[] data = new object[3];
data[0] = issue;
data[1] = sb;
data[2] = news;
htmlPage = IssueProvider.GetEmailBody(issue, news, null, sb, true, CMSContext.CurrentSiteName, null, null, null);
htmlPage = IssueHelper.ResolveMacros(data, htmlPage, culture);
Anyway, the code which generates the Preview HTML code can be found in the following file so you can take a look how it is implemented:
~\CMSModules\Newsletters\Tools\Newsletters\Newsletter_Issue_ShowPreview.aspx.cs.
Best regards,
Michal Legen