Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Open Word document from Internet Explorer on intranet

21 views
Skip to first unread message

Magnus Olsson

unread,
Sep 3, 2010, 4:16:39 AM9/3/10
to
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(Se
http://groups.google.se/group/microsoft.public.word.vba.general/browse_thread/thread/95b698964cf6ceb4/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.

Gordon

unread,
Sep 3, 2010, 4:50:16 AM9/3/10
to
On Sep 3, 9:16 am, Magnus Olsson <magnusolsso...@gmail.com> wrote:
> 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?

Gordon

unread,
Sep 3, 2010, 4:54:07 AM9/3/10
to

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.

Bwig Zomberi

unread,
Sep 20, 2010, 2:39:08 AM9/20/10
to

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

--
Bwig Zomberi

0 new messages