View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default how to open xla file in automation way with disable macro

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

--
Jim
"Arnaud" wrote in message
...
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\YourW orkbook.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