views:

120

answers:

2

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.

+1  A: 

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

vlood
...in your Trusted Zone, and add your intranet servers into this zone. DO NOT even think of enabling this in the Internet Zone - you would open a gateway for all kinds of malware.
Piskvor
I add the interanet server to the Local intranet zone. And then I set "Initialize and script ActiveX controls not marked as safe for scripting" to Enabled.
magol
Piskvor, thanks for writing it in a more detailed manner :)
vlood
A: 

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

airbai