如何使Excel加载项debugging器启动特定的文件?

我有Excel加载项目,我需要打开特定的Excel文件,当我运行debugging。 想法?

我没有testing过,但将以下代码添加到启动事件应该这样做:

private void ThisAddIn_Startup(object sender, System.EventArgs e) { #if DEBUG this.Application.Workbooks.Open(@"C:\file.xlsx"); #endif }