开发者

Open Word document from Internet Explorer on intranet

开发者 https://www.devze.com 2023-01-14 21:41 出处:网络
We have an internal website for document management. When you choose to open a document, it run the following script to open the file:

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)

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.


Try allowing all kind of scripts in IE. I believe there was something about macroses...


I guess the issues is reated to Security setting of IE.

0

精彩评论

暂无评论...
验证码 换一张
取 消