Outlook 2003 developpement C#
Bonjour � tous,
Je ne sais pas si j'ai bien fait de poster ici ou si j'aurais du le faire dans la partie .Net C# donc dsl d'avance.
J'ai un probl�me de r�f�rence concernant un projet application console en C# :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.Outlook;
using Microsoft.Office.Core;
namespace ConsoleApplicationOutlook
{
class Program
{
static void Main(string[] args)
{
Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass();
Microsoft.Office.Interop.Outlook._NameSpace olNS = olApp.GetNamespace("MAPI"); Microsoft.Office.Interop.Outlook._Folders oFolders;
oFolders = olNS.Folders;
Microsoft.Office.Interop.Outlook.MAPIFolder oPublicFolder = oFolders.Item("Public Folders");
oFolders = oPublicFolder.Folders;
Microsoft.Office.Interop.Outlook.MAPIFolder oAllPFolder = oFolders.Item("All Public Folders");
oFolders = oAllPFolder.Folders;
Microsoft.Office.Interop.Outlook.MAPIFolder oMyFolder = oFolders.Item("My Public Folder");
Console.Write(oMyFolder.Name);
}
}
} |
Le probl�me intervient � ce niveau :
Microsoft.Office.Interop.Outlook.MAPIFolder oMyFolder = oFolders.Item("My Public Folder");
avec cette erreur :
Citation:
Erreur 2 'Microsoft.Office.Interop.Outlook._Folders' ne contient pas une d�finition pour 'Item' et aucune m�thode d'extension 'Item' acceptant un premier argument de type 'Microsoft.Office.Interop.Outlook._Folders' n'a �t� trouv�e (une directive using ou une r�f�rence d'assembly est-elle manquante*?)
Savez-vous comment r�gler ce probl�me?
Merci d'avance,
Foyus