我想使用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 )
什么都没有被替换。