这仅适用于IE
如果我们想在其他浏览器中使用邮件合并功能,代码是什么
<script>
if (window.ActiveXObject){
try
{
ovtigerVM = eval("new ActiveXObject('vtigerCRM.ActiveX');");
if(ovtigerVM)
{
var filename = "<?php echo $filename?>";
if(filename != "")
{
if(objMMPage.bDLTempDoc("<?php echo $site_URL?>/test/wordtemplatedownload/<?php echo $filename?>","MMTemplate.doc"))
{
try
{
if(objMMPage.Init())
{
objMMPage.vLTemplateDoc();
objMMPage.bBulkHDSrc("<?php echo $site_URL;?>/test/wordtemplatedownload/<?php echo $datafilename ?>");
objMMPage.vBulkOpenDoc();
objMMPage.UnInit()
window.history.back();
}
}catch(errorObject)
{
document.write("Error while processing mail merge operation");
}
}else
{
document.write("Cannot get template document");
}
}
}
}
catch(e) {
document.write("Requires to download ActiveX Control from vtigerCRM. Please, ensure that you have administration privilage");
}
}
</script>发布于 2014-12-01 10:50:11
因为ActiveX控件的缘故,你根本不能。但在github上,有一个mod可以完成同样的任务,生成一个OpenOffice文档(与Word兼容)。它只能在VTiger5.4 https://github.com/tsolucio/corebos/commit/21a33c071777a312ca6ce11e4b13889994dc52a4上运行
https://stackoverflow.com/questions/26731075
复制相似问题