Save Excel File

K

kaanacar

Hi
I wrote an add-in button to Excel. When user click this button i want
to save excel file to another place like c:\tmp.xls. However it does
not save file. My code is

object missing = System.Reflection.Missing.Value;
Excel.Application application = (Excel.Application) applicationObject;
Excel.Workbook tmp = application.Workbooks.get_Item(1);
tmp.SaveAs("c:\asd.xls",missing, missing ,missing ,missing ,missing,
Excel.XlSaveAsAccessMode.xlNoChange,missing ,missing ,missing,missing);

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top