日期:2014-05-16  浏览次数:20940 次

Asp获取数据插入Word模板时,字体颜色设置问题
我做了一个Word模板,用ASP将ACCESS表中查询到的值赋给一个个变量将其输出到Word模板里.
我有两个文件:一个是.asp的,调用数据和打word模板的;另一个是word模板.

接着之前的两个问题:
我需要设置其中的一部分内容(TDep.Fields.Item("tecompany").Value)的颜色为"#333399".

在.asp文件中,相关的语句:
<% 
While ((Repeat1__numRows <> 0) AND (NOT TDep.EOF)) 
texperience=texperience&TDep.Fields.Item("tecompany").Value&"<br>" & TDep.Fields.Item("teleaving").Value&"<br>"

  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  TDep.MoveNext()
Wend

templateContent=replace(templateContent,"{$texperience}",texperience)'''''''
%>


请问怎么设置???非常感谢!!!
asp Word模板

------解决方案--------------------
texperience=texperience&"<font color='#333399'>"&TDep.Fields.Item("tecompany").Value&"</font><br>" & TDep.Fields.Item("teleaving").Value&"<br>"

楼主学些html知识吧。。