how to open xla file in automation way with disable macro

G

Guest

Hi,

I have found an article in msdn to open excel XLS/XLA file but I want it
start with disable macro.

// C#
Excel.Workbook wb =
ThisApplication.Workbooks.Open(@"c:\YourPath\YourWorkbook.xls",
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);

any help appreciated thx
Arnaud
 
J

Jim Rech

You should investigate the Application.AutomationSecurity property. It may
do what you want. See Help for this method in the VBE.
 

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