HTML表我想创建该表和循环创造了行使用VBA的电子邮件模板:创建VBA
<td width=254 nowrap style='width:190.75pt;border:none;border-bottom:solid white 1.0pt;background:#BDD7EE;padding:0in 5.4pt 0in 5.4pt;height:16.5pt'><p class=MsoNormal align=center style='text-align:center'><b><span style='font-family:"Times New Roman",serif;color:black'> <o:p></o:p></span></b></p></td></tr></table>
我想:
FullString = "<td width=254 nowrap style='width:190.75pt;border:none;border-bottom:solid white 1.0pt;background:#BDD7EE;padding:0in 5.4pt 0in 5.4pt;height:16.5pt'><p class=MsoNormal align=center style='text-align:center'><b><span style='font-family:""&""Times New Roman""&"",serif;color:black'>FirstName<o:p></o:p></span></b></p></td></tr></table>"
ReplaceWith = "<td width=254 nowrap style='width:190.75pt;border:none;border-bottom:solid white 1.0pt;background:#BDD7EE;padding:0in 5.4pt 0in 5.4pt;height:16.5pt'><p class=MsoNormal align=center style='text-align:center'><b><span style='font-family:""&""Times New Roman""&"",serif;color:black'>James<o:p></o:p></span></b></p></td></tr><td width=254 nowrap style='width:190.75pt;border:none;border-bottom:solid white 1.0pt;background:#BDD7EE;padding:0in 5.4pt 0in 5.4pt;height:16.5pt'><p class=MsoNormal align=center style='text-align:center'><b><span style='font-family:""&""Times New Roman""&"",serif;color:black'>FirstNameReplace<o:p></o:p></span></b></p></td></tr></table>"
oTemplate.HTMLBody = Replace(oTemplate.HTMLBody, FullString, ReplaceWith)
没有被换下。
插入表格对象插入到邮件正文 – jsotola