Hi!

When I'm opening a Word document from a website (in
Internet Explorer) I've developed, the Sub function
Document_Open() doesn't work. I've also tried AutoOpen,
but it doesn't work either. I believe it is nothing wrong
with the macro itself, since it does work when
I "manually" start it (tools/macro..).

However, if I let Internet Explorer open the Word document
inside a browser window, the Sub function Document_Open()
does work as it should...

This is how I want it to be: when the user click the link
on the website I want MS Word to open the document and the
macros to run... (not open word inside a browser)

What am I doing wrong?? Is this a security setting problem
in Internet Explorer?? Why does the macro work when word
opens in Internet Explorer and not when Word opens
directly???

Please advise!
/NG

Re: Document_Open doesn't work!!! by martinique

martinique
Sat Aug 16 01:58:13 CDT 2003

This is a security block that is -- or should be -- insurmountable. Running
code like that from a website is a no-no. If the document starts at your end
(as in your second example) then the normal macro security operates, but if
the document is coming from a web page code execution is blocked completely.
This is as it should be: think of the virus implications if a downloaded
Word document automatically ran code...

A lot of people (including me) are very reluctant to download a Word
document under any circumstances, and quite a few corporate networks prevent
it completely.




"NG" <niklas.gustavsson@af.se> wrote in message
news:032501c3623c$bdd9c030$a001280a@phx.gbl...
> Hi!
>
> When I'm opening a Word document from a website (in
> Internet Explorer) I've developed, the Sub function
> Document_Open() doesn't work. I've also tried AutoOpen,
> but it doesn't work either. I believe it is nothing wrong
> with the macro itself, since it does work when
> I "manually" start it (tools/macro..).
>
> However, if I let Internet Explorer open the Word document
> inside a browser window, the Sub function Document_Open()
> does work as it should...
>
> This is how I want it to be: when the user click the link
> on the website I want MS Word to open the document and the
> macros to run... (not open word inside a browser)
>
> What am I doing wrong?? Is this a security setting problem
> in Internet Explorer?? Why does the macro work when word
> opens in Internet Explorer and not when Word opens
> directly???
>
> Please advise!
> /NG



Re: Document_Open doesn't work!!! by Cindy

Cindy
Tue Aug 19 12:18:41 CDT 2003

Hi Ng,

> This is how I want it to be: when the user click the link
> on the website I want MS Word to open the document and the
> macros to run... (not open word inside a browser)
>
I think you need to use Script in your webpage, which the
link activates, to automate Word and open the document. If
WORD opens the file, AutoOpen (or the_Open event) should get
triggered.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)