Events don't work in embeded word objects

A

ARHangel

I have created a word and attached on open event a message box.

Private Sub Document_Open()
MsgBox "Open"
End Sub

Now I create a new word document and insert with Insert/Object...
CreateFromFile the document before created.
Now my question is why the message box did not appear? If you create an
excel like up with an open event and add it in the word document the message
box is showed.
Is there a way to make the message box appear in the word case?

This is just an example. What I want is to print the document on closing,
but it is an embeded object that is edited outside(in Word)
 
C

Cindy M.

Hi =?Utf-8?B?QVJIYW5nZWw=?=,
I have created a word and attached on open event a message box.

Private Sub Document_Open()
MsgBox "Open"
End Sub

Now I create a new word document and insert with Insert/Object...
CreateFromFile the document before created.
Now my question is why the message box did not appear?
Because the Auto macros don't execute when a Word document is an
embedded object. They just don't (and it makes no difference if they
do in another Office app - in Word they don't).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17
2005)
http://www.word.mvps.org

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