Opening Excel file in a SharePoint document library from VSTO with specified credentials
- by Saab
I'm trying to open a workbook from within Excel. The Excel file is located on a SharePoint server, within a Document Library.
I use the following code to open the workbook.
newWorkbook = globalsThisAddInApplication.Workbooks.Open(
workbookUrl, Type.Missing, false,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
When I do this the user has to enter his credentials (username/password dialog). I'm already storing the user credentials, and I want them to be used when the file is opened.