Document_Open

D

David C.

Hello

I tryed to use a sub called Document_Open
( I would like to have a macro auto-running when the document is opened)

But... nothing happened when I open this document !!!
Any idea ? Something forgotten ?

even a simple for a start:
private sub Document_Open()
msgbox("ok")
end sub

thank you
 
C

Charles Kenyon

Are you opening the document or creating a new document based on the
template. If the latter, you also need a Document_New procedure.

These subs have to go in the ThisDocument object, not in a macro module.
 
J

JB

You should try using file open to open the document. If the macro still
doesn't work then put the same code in the Document_New event :)
 
Top