ServiceRequest Failed

I am trying to execute samples at http://msdn.microsoft.com/office/tool/vsto/2005/download/ but this results me with a problem at the following line of code,
Globals.ThisApplication.ServiceRequest += new EventHandler<Microsoft.Office.Tools.ServiceRequestEventArgs>(ThisApplication_ServiceRequest);
Any ideas I am targetting Outlook 2007 in the office family, and the error text reports that [ 'ThisApplication' does not contain definition for 'ServiceRequest' ] Furthermore, this has been the case with not only Ribbons but Form Regions also.
Thanks in advance ...


Answer this question

ServiceRequest Failed

  • sdflksdfsda sdfklsdf sdk ksdfk s

    Well, I had double checked that there is no such namespace mis-match. Default declaration of ThisApplication class is marked as public sealed partial class (i.e. in ThisApplication.Designer.cs file), so ultimately template genrated class (by Outllok AddIn) is also a public partial class. But I think declaring classes as partial spread over several files isnt the problem.

    Real problem is that I dont find any documentation for ServiceRequest event, also the intellisense is sense-less in this regard. Hope this clears the matter.


  • testuser1

    I suspect you're mixing the code from two different releases. In the first VSTO v3 CTP in March 2006, the code required to hook up a ribbon including setting the RequestService event. However, in the June CTP this was streamlined so that you no longer need to do that. The June CTP includes an updated tutorial document that includes details of how to setup a ribbon, task pane and form region using our new IServiceProvider implementation.


  • John Doh

    This is a shot in the dark, if by chance one has changed/renamed namespaces, if a partial class is spread over different pages...one can get subtle compile time problems. If you change the namspace in one, make sure the other partial pages have the same namespace. Good luck.


  • ServiceRequest Failed