open file Excel from MSWord automatically

M

massi

hi, i would like to create a macro that whne a MSWord file is open
automatically opens an Excel file .

i have tried the following but it doesn't work. any idea? thanks in advance
Sub Open_Internet_File()

'Open the file
Workbooks.Open FileName:="N:\graphs.xls"
End Sub
 
M

massi

hi Doug,
the macro works fine but i cannot set it in order to run automatically
whenever i open the word document.
rgds
 
D

Doug Robbins - Word MVP

If you want a macro to run when you open a document, it needs to be named
autoopen.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

massi

thanks a lot!!!

Doug Robbins - Word MVP said:
If you want a macro to run when you open a document, it needs to be named
autoopen.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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