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

Document_Open doesn't work!!!

1 view
Skip to first unread message

NG

unread,
Aug 14, 2003, 4:19:11 AM8/14/03
to
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

martinique

unread,
Aug 16, 2003, 2:58:13 AM8/16/03
to
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.g...@af.se> wrote in message
news:032501c3623c$bdd9c030$a001...@phx.gbl...

NG

unread,
Aug 18, 2003, 9:17:09 AM8/18/03
to
Thank You for posting a reply to my question!

Unfortunately You didn't answer my question. Instead you
provided information that almost anyone knows...

Maybe I didn't explain my problem in detail.

The website I've developed is going to be used on an
intranet.. as part of automating an industy process.
The files that can be seen trough this website are trusted
and includes macros to enhance the making of different
reports...
For example, it works fine with Excel (workbook_open runs
when the excel-file opens from this website)... however it
doesnt work in MS Word. The function Document_Open won't
run when this file is opened the website...
You're probably right that this is a security block... but
I find strange that it works in Excel but not for Word..
My question still remains!

/NG

>.
>

Cindy Meister -WordMVP-

unread,
Aug 19, 2003, 1:18:41 PM8/19/03
to
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 :-)

Lars-Eric Gisslén

unread,
Aug 19, 2003, 1:58:05 PM8/19/03
to
NG,

This is a wellknown problem and MS has no simple workaround. We got the idea
to our solution from MS's own Office site where they have sample documents
to download. When you click on a document link an ActiveX component will be
installed on your computer which in turn downloads the document to your
computer and starts Word with the document opened. Then every thing works as
it should. We are hosting 'document hotels' via Internet for many large
corporations, authorities, hospitals and so on, where they move from printed
documents to electronic documents. As we have more than 100,000 downloads
per month and many documents has macros, we needed to come up with a
solution. We created a solution similar to MS's solution and everything
works like a charm. We don't put the component on the clients site before
they agree and they can infor the whole organisation. So far nobody has
rejected our solution as they don't really have any option.

BTW, my boss has been working for ÅF and I have a friend i Karlstad working
as a system developer for ÅF there. This is where I come from: www.signon.se

Regards,
Lars-Eric

"NG" <niklas.g...@af.se> skrev i meddelandet
news:07c701c3658b$07457d80$a601...@phx.gbl...

0 new messages