1

I want to create an Outlook Add-In that will forward an email to a document library in SharePoint 2010. I've started off by using the Outlook Add-In template and have so far created the ribbon interface and button. This works fine and I can see it in Outlook and click on the button.

The next bit is where I am a little lost; I've added a reference to the SharePoint.dll but I cannot access it in the Outlook - ThisAddIn.cs. Is this not possible or am I missing something?

The solution is to select an email, click on the button that I have created on the ribbon within Outlook, this will load a list of Companies that the email can be associated with via a listbox in SharePoint and then strip and upload the data.

I'm competent in the retrieving and adding information to SharePoint but have never done this in an Outlook Add-In.

I am new to VSTO development so any pointers would be much appreciated.

Thanks

Pavan Dhariwal
  • 145
  • 1
  • 3
  • 15
  • 1
    I don't think that this is working with the SharePoint.dll. I think for such a task you should consider using a WCF or Web Service and handle over the Service the Communication between Outlook and SharePoint – Mark Sep 26 '12 at 11:26
  • 1
    You should highlight your problem and question. "Is this possible" is not a good question, since a simple yes or no would suffice, correct? "Any pointers" is much to subjective as well. Another tip is to edit your title. Just listing a bunch of tags is not descriptive, try to name it something like "Creating an addin that sends email to document library in Sharepoint" or something that will attract readers. [Writing the perfect question](http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx) has more of these tips if you're interested. – Patrick Sep 26 '12 at 12:09

1 Answers1

0

I've added a reference to the SharePoint.dll but I cannot access it in the Outlook

You can only use the Microsoft.SharePoint.dll object model from code actually running on the SharePoint server - not on remove PC's such as your users PC's.

Instead you need to look into SharePoints Web Services or the Client Object Model.

Community
  • 1
  • 1
Ryan
  • 23,871
  • 24
  • 86
  • 132