Supprressing Warning message from Macro

G

Garry

I have written a macro in Word VBA using Word 2002. This
macro opens an excel spreadsheet then copies some graphs
into a Word document. However, because the excel file
contains macros, the Word macro halt execution due to a
warning message that the file contains macros and ask if I
want to continue. I would like to suppress this warning
message from within the Word macro such that the macro
will continue to run.

Any and all help would be greatly appreciated
 
C

Cindy M -WordMVP-

Hi Garry,
I have written a macro in Word VBA using Word 2002. This
macro opens an excel spreadsheet then copies some graphs
into a Word document. However, because the excel file
contains macros, the Word macro halt execution due to a
warning message that the file contains macros and ask if I
want to continue. I would like to suppress this warning
message from within the Word macro such that the macro
will continue to run.
Office XP added a new bit of functionality that allows you to
control macro security for files you're opening. In Word,
it's
Application.AutomationSecurity

I'm, not sure whether it's named exactly the same for Excel,
but basically, you'd need to set this for the Excel
application object you're using to open the spreadsheets.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
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