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 :)
 

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