Open Word document from Internet Explorer on intranet

M

Magnus Olsson

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:eek:pendokument('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(Se
http://groups.google.se/group/micro...8964cf6ceb4/5d564c2c8cc6e072#5d564c2c8cc6e072)

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.
 
G

Gordon

We have an internal website for document management. When you choose
to open a document, it run the following script to open the file:

And this has what to do with PHP?
 
G

Gordon

And this has what to do with PHP?

Oh, sorry, my bad. The javascript and PHP group end up right next to
each other for me so I sometimes fail to notice which group I'm in.

The chances are that the macro problems are due to the fact that
Microsoft has increased security in its products over the years and
turned off word document macros in internet explorer. They were a
major vector for virus propagation in the past so they are now no
longer trusted by default. You can probably reconfigure your browser
to enable them again for the trusted zone, but be aware that doing so
would also negate the security advantages of having them turned off.
 
B

Bwig Zomberi

Magnus said:
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:eek:pendokument('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(Se
http://groups.google.se/group/micro...8964cf6ceb4/5d564c2c8cc6e072#5d564c2c8cc6e072)

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.

Save the file to desktop, right-click (show Properties dialog) and click
the Unblock button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top