Document_Open don't work

G

Guillaume

Hi,

I have a word document with a Document_Open macro in it.
My document is filled with a Intranet Forms (when I send
the form, it writes a text document on the hard drive and
then launch the word document. The word document reads
the text file ti fill the field).

The Document_Open don't work when I open it from my
Intranet, I must go in the vb editor to launch the macro
manually.

It seems to look like this : KB329815
All the security are set correctly, I have try with Word
2002 with all the patchs and with none. The same document
works fine under Word 2000.

IS anyone could help me ?

Thanx in advance.
 
P

Peter Hewett

Hi Guillaume

If you open the document manually with Word does the Document_Open event
handler fire? And is the Document_Open procedure in the ThisDocument class
module?

Cheers - Peter
 
J

Jezebel

Macros will never run for a document opened directly from the Internet.
Think of the security implications if they could! There is no work-around
for this. If you want the macros to run, the user has to download the
document first, then open it from their hard disk.
 
G

Guillaume

Hi Peter,

When I open the document manually, the Document_Open
event fire.
The procedure is in the ThisDocument class module.
Its so strange. When I choose to view the word document
within Internet Explorer, The macro is launch but doesn't
go to the end, she stopped before. If I choose to open
the document within Word, the macro is not executed.

The macro do :
- Read the content of a text file to fill some field
- Print the document
- record it on hard drive
- Send the document by mail using
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
- close the word document

I use this option to choose if I open the document in
word or in IE :
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.8]
@="Document Microsoft Word"
"BrowserFlags"=dword:00000008

Cheers - Guillaume
 

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