I'm developing an MS Word 2010 add-in (using C#), which has a custom Ribbon tab. In that tab there is a button, which should open a particular Word document (MyTemplate.docx), which is located in SharePoint 2010 server's Shared Documents library. The URL of my development server (internal) is 'http://sharepoint2010'. I'm trying to use SP object model elements, such as SPSite, SPWeb, etc... When I try :
SPSite site = new SPSite(@"http://sharepoint2010");
I get error: "The Web application at 'http://sharepoint2010' could not be found"
I do have a valid Web Service Reference:
HomeDataContext dc = new HomeDataContext(new Uri("http://sharepoint2010/_vti_bin/listdata.svc"));
which allows me to obtain a listing of documents in the Shared Documents library. I'm able to iterate through that list and obtain individual SharedDocumentItem, but I don't understand how to open it as a Word document.