VML标签不会在"字"中呈现我在经典asp中创建的文档

时间:2014-07-23 11:56:13

标签: html ms-word vml

我的经典asp代码生成以下HTML(包括VML标签),它在浏览器上显示正常但是只要使用相同的代码生成word文档,word文档仍然生成正常但是所有vml标签丢了!我的意思是只有html标签打印正常,但vml标签不是!

我尝试用SVG标签替换vml标签,但SVG标签也遇到了相同的结果!

请注意,此问题仅在Office 2013中出现,word文档在office 2007中生成所有vml和html标记。
我们不能回滚。

由下面粘贴的代码生成的HTML

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"     xmlns:w="urn:schemas-microsoft-com:office:word">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">

<link rel=File-List href="xxxtestlink">

<title>TEST VML CHECK REPORT</title>
<style>
...
</style>

<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>

</head>
<body lang="EN-GB">

<div class=Section1>

<style>
p { font-family: Arial; color: #505050; line-height: 120%; }
p.spaced { line-height:12.0pt; mso-line-height-rule: exactly; }
li { margin-top: 0pt; margin-bottom: 0pt; color: #505050; line-height: 120%; }
strong { color: #505050; }
table.small { color: #505050; line-height:12.0pt; mso-line-height-rule: exactly; font-size: 7pt; }
table.small tr { padding: 1.4pt 1.4pt 1.4pt 1.4pt; }
table.small td { padding: 1.4pt 1.4pt 1.4pt 1.4pt; }
table.small td.header-alt { color: #52619E; border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; }
table.small td.header-alt-ac { color: #52619E; border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; text-align: center; }
table.small td.header-alt-ar { color: #52619E; border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; text-align: right; }
table.small td.data-alt { border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; }
table.small td.bb { border-color: #505050; }
table.small td.btb { border-color: #505050; }
table.small td.bt-ar { border-color: #505050; }
table.small td.bb-ar { border-color: #505050; }
table.small td.btb-ar { border-color: #505050; }
table.small td.btb-alt { border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; } 
table.small td.btb-ar-alt { border-bottom: solid #52619E 1.0pt; mso-border-bottom-alt: solid #52619E 0.5pt; text-align: right; }
</style>
<p class="spaced"><o:p></o:p><v:shape style="position:absolute;width:167pt;height:670.75pt;z-index:-1;mso-wrap-distance-top:5.65pt;mso-wrap-distance-bottom:5.65pt;mso-position-horizontal:right;mso-position-horizontal-relative:margin;mso-position-vertical:top;mso-position-vertical-relative:margin" stroked="f"><v:textbox style="mso-fit-shape-to-text:f" inset="0,,0">
<br>
<table cellspacing=0 cellpadding=0 class="small" style="background:#EDF1F8;width:100%;">
<tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Country</td><td class="data-alt">China</td>
<td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Sector</td><td class="data-alt">Junk</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Transaction type</td><td class="data-alt">Other</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>outburst date</td><td class="data-alt">September 2001</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>another junk</td><td class="data-alt">10.6x 2000 P/E</td><td>   </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Val method</td><td  class="data-alt">Cost less provision</td><td> </td></tr><tr><td></td><td class="header-alt"  style="font-weight: bold;" nowrap>Internet</td><td class="data-alt">-</td><td>   </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Current  Multiple</td><td class="data-alt">-</td><td> </td></tr><tr><td></td><td class="header-alt"  style="font-weight: bold;" nowrap>Enter value</td><td class="data-alt">-</td><td>   </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Equality  value</td><td class="data-alt">-</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-     weight: bold;" nowrap>Role</td><td class="data-alt">Follow</td><td> </td></tr><tr><td></td><td     class="header-alt" style="font-weight: bold;" nowrap>Key   mythbusters</td><td class="data-alt">Warnor sisters</td><td> </td></tr><tr><td></td><td  class="header-alt" style="font-weight: bold;" nowrap>Board rep</td><td class="data- alt">ChekcName2</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;"   nowrap>Investment manager</td><td class="data-alt">Angoor</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>BEAM</td><td class="data-alt">-</td><td> </td></tr><tr><td></td><td class="header-alt" style="font-weight: bold;" nowrap>Number of employees</td><td class="data-alt">90</td><td> </td></tr></table><br></v:textbox>
<w:wrap type="topAndBottom" anchorx="margin" anchory="margin"/></v:shape><v:shape     e="position:absolute;width:315pt;z-index:-3;mso-wrap-distance-top:5.65pt;mso-wrap-distance- bottom:5.65pt;mso-position-horizontal:right;mso-position-horizontal-relative:margin;mso-position-vertical:bottom;mso-position-vertical-relative:margin" stroked="f"><v:textbox style="mso-fit-shape- to-text:t" inset="0,,0,0"><p><v:shape style="width:104.775mm;height:44.979mm"><v:imagedata src="../inc/read-image-data.asp?imageid=7146"/></v:shape></p></v:textbox><w:wrap  type="topAndBottom"    anchorx="margin" anchory="margin"/></v:shape><SPAN>
<p class="spaced"></SPAN><SPAN><o:p>&nbsp;</o:p></SPAN></P>
<p class=MsoNormal>&nbsp;</p>
</div>
</body>
</html>

2 个答案:

答案 0 :(得分:0)

**根据我的经验。 **

space之前添加*。因为v\: *是一个选择器,但v\:*是一个奇怪的标签名称)并添加display css规则,这对我来说很关键,然后我在IE中渲染VML:

<style type="text/css">
v\: * { behavior: url(#default#VML);display:inline-block; }
</style>

你也可以在这里打印错误:

<v:shape     e="position:absolute;

答案 1 :(得分:0)

我找到了答案!感谢Varun Gulati,对于任何可能正在努力解决此类问题的人来说,解决方案就是取代

<v:shape></v:shape>

<v:rect xmlns:v="urn:schemas-microsoft-com:vml"></v:rect> tags in the code .

对所有想过这个和/或回答的人表示感谢和赞赏。

维沙尔