How to find aseembly for Outlook MAPIFolder

Apr 13, 2014 at 12:30 PM
Dear Sebastian,

Using code that I took from one of your replies to access MAPIFolders and using the references:

using System;
using Office = OfficeApi;
using Outlook = OutlookApi;


Outlook__NameSpace outlookNs = this.myApp.Application.Session;

OutlookApi.MAPIFolder root = this.myApp.Session.DefaultStore.GetRootFolder() as Outlook.MAPIFolder;
on compiling produces the errors:
"The type or namespace name 'Outlook__NameSpace' could not be found (are you missing a using directive or an assembly reference?) (CS0246) - C:\Users\David Hyde\Documents\SharpDevelop Projects\Practice Administrator\Practice Administrator\Outlookfolder.cs:33,4"
"The type or namespace name 'MAPIFolder' does not exist in the namespace 'OutlookApi' (are you missing an assembly reference?) (CS0234) - C:\Users\David Hyde\Documents\SharpDevelop Projects\Practice Administrator\Practice Administrator\Outlookfolder.cs:34,15"; and
"The name 'EnumerateFolders' does not exist in the current context (CS0103) - C:\Users\David Hyde\Documents\SharpDevelop Projects\Practice Administrator\Practice Administrator\Outlookfolder.cs:36,4".
What assemblies do I need to access these objects, please?

Regards,

David Hyde
Coordinator
Apr 14, 2014 at 4:33 PM
Edited Apr 14, 2014 at 4:33 PM
you need the following references to deal with ms-outlook:

OutlookApi.dll
OfficeApi.dll
NetOffice.dll

you find a deployment table here to deal with all ms-office applications: here https://netoffice.codeplex.com/documentation (scroll down)

*hope it's helpful
Sebastian
Apr 15, 2014 at 10:49 AM
Dear Sebastian,

Thank you for that.

Now my .dll references read

using NetOffice; (is greyed out as not referred to.)
using Office = OfficeApi;
using Outlook = OutlookApi;

and trying to declare a variable:

Outlook.MAPIFolder ; or,
Outlook.Session

produces a pop-up window which shows "utils()" only.

I am following the coding that people are using in other threads.

My system is Windows 7 64bit.

Regards,

David Hyde
Apr 15, 2014 at 2:00 PM
Dear Sebastian,

Problem solved!

Cut and Paste fom one of your examples gave me use Netoffice.OutlookApi which results in list of Outllook properties/method being shown.

Regards,

David Hyde