ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel object library method to open a document in safe mode? (https://www.excelbanter.com/excel-programming/422144-excel-object-library-method-open-document-safe-mode.html)

sherifffruitfly

Excel object library method to open a document in safe mode?
 
I'm coming to Excel from C#, and need to open a document in Excel,
with no add-ins - how can I do this from Excel's object library? (For
Office 2003).


Thanks for any hints,

-sff

sherifffruitfly

Excel object library method to open a document in safe mode?
 
On Jan 8, 5:11*am, Shasur wrote:
The following can give you a hint

* * * * * * * * System.Diagnostics.Process.Start("Excel.exe", "/Safe");
* * * * * * * * oXL =
(Excel.Application)Marshal.GetActiveObject("Excel. Application");


Thank you!

As there may be several instances of Excel running, I still need to
figure out how to use ProcessId (or something) to get the right one,
but you've given me enough to get rolling.


Thanks again!

sff


All times are GMT +1. The time now is 01:58 PM.

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