Search the Community
Showing results for tags 'new process'.
-
Since Office 2013 Excel uses the same instance to open Excel sheets. E.g. if your app starts Excel using COM (Excel.au3) and you open another Excel sheet from windows explorer than this sheet will be attached to your instance. When you close your app it will automatically close also the other attached sheet. Is it possible to implement in AutoIt something like this here? Source: https://social.msdn.microsoft.com/Forums/office/en-US/25794163-d33b-478b-af6a-7dd0bf437380/how-to-make-sure-that-opening-a-workbook-starts-a-new-excel-process-and-does-not-use-the-existing?forum=exceldev Process excelProcess = new Process(); string filePath = @"C:\Users\Person\Desktop\OPen.xlsx"; excelProcess.StartInfo.FileName = @"C:\Program Files\Microsoft Office 15\root\office15\EXCEL.EXE"; excelProcess.StartInfo.Arguments = @"/x " +filePath; excelProcess.Start(); Thread.Sleep(10000); Excel.Workbook workbook = Marshal.BindToMoniker(filePath) as Excel.Workbook; Excel.Application excelApp = workbook.Application; Console.WriteLine(excelApp.ActiveWorkbook.Name); excelApp.Quit(); I'm using _Excel_Open(False, False, True, True, True)but it doesn't work. Thanks.