ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to open xla file in automation way with disable macro (https://www.excelbanter.com/excel-programming/339594-how-open-xla-file-automation-way-disable-macro.html)

Arnaud

how to open xla file in automation way with disable macro
 
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

Jim Rech

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





All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com