简体   繁体   English

从Intranet上的Internet Explorer打开Word文档

[英]Open Word document from Internet Explorer on intranet

We have an internal website for document management. 我们有一个用于文件管理的内部网站。 When you choose to open a document, it run the following script to open the file: 选择打开文档时,它将运行以下脚本来打开文件:

<a href="javascript:opendokument('P:\\01\\2-010-01.doc')">012-010-01</a> 

<SCRIPT language=javascript>  
function opendokument(dokument){ 
var objAppl;

try{ 
    objAppl = GetObject("","Word.Application"); 
    objAppl.Documents.open(dokument); 
} 
catch(exception){ 
    objAppl = new ActiveXObject("Word.Application"); 
    objAppl.Visible = true; 
    objAppl.Documents.open(dokument); 
}    
objAppl = null;  
} 
</script> 

The problem is that the macros in the document is not running correctly now as we move from Windows XP with Office 2003 to Windows 7 with Office 2007 (See my previous post ) 问题是,当我们从带有Office 2003的Windows XP迁移到带有Office 2007的Windows 7时,文档中的宏现在无法正确运行(请参阅我以前的文章

If I run the script locally on my computer or if I open the documents manually macros work properly. 如果我在计算机上本地运行脚本或手动打开文档,宏将正常工作。 How do I get this to work? 我该如何工作? Any setting I can do in Word or Internet Explorer, or can I rewrite the script on the site that open documents. 我可以在Word或Internet Explorer中进行的任何设置,或者可以在打开文档的网站上重写脚本。

Try allowing all kind of scripts in IE. 尝试允许IE中的所有脚本。 I believe there was something about macroses... 我相信关于宏的事...

我认为问题与IE的安全性设置有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 打开 Intranet 网站时 Internet Explorer 11 上的 Javascript window.open() 无法正常工作 - Javascript window.open() on Internet Explorer 11 when open intranet website not work correctly 在Internet Explorer中从二进制文件打开PDF - Open PDF from binary in Internet Explorer 从JavaScript打开Word文档 - Open a word document from javascript 为什么这个JavaScript(使用document.open和document.write)不能在Internet Explorer或Opera中运行? - Why won't this JavaScript (using document.open and document.write) work in Internet Explorer or Opera? VBA / Internet Explorer / Javascript:如何从同一Internet Explorer打开JavaScript窗口? - VBA / Internet Explorer / Javascript: How to open a javascript window from same internet explorer? 从 Java 客户端服务器应用程序打开本地 Internet Explorer - Open Local Internet explorer from Java Client Server Application 如何从Internet Explorer 11中的window.open返回值? - How to return value from window.open in Internet Explorer 11? Internet Explorer不保存打开文件对话框中的路径 - Internet Explorer doesn't save the path from the open file dialog 在 Internet Explorer 中打开的弹出窗口 - Popup window open in Internet explorer 在Internet Explorer中打开强制窗口 - force window open in internet explorer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM