A
Alexander
Environment
server: SBS2003SP1/ExchangeSP2/McAfee antivirus
workstation: WinXP SP2/Outlook 2003 in cashed mode/Norton AV/VS2005
I have 2 identical sets of tasks, one in the .pst file in my home folder on
the server, second in the Exchange in my profile.
Code below will enumerate all task from .pst with out problems. But when I
will try to enumerate task from Exchange task folder, some of the object
will come back as null.
So far my guess that server antivirus some how has affecting enumeration,
but I will greatly appreciate any another suggestions.
Outlook.Application objOutlook = new Outlook.ApplicationClass();
Outlook.NameSpace objNS = objOutlook.GetNamespace("MAPI");
Outlook.MAPIFolder folder = objNS.PickFolder(); // I will select task folder
int total = 0;
int bad = 0;
int good = 0;
foreach (object obj in folder.Items)
{
Outlook.TaskItem item = obj as Outlook.TaskItem;
total++;
if (item == null)
{
bad++;
}
else
{
good++;
}
}
Sincerely,
Alexander
server: SBS2003SP1/ExchangeSP2/McAfee antivirus
workstation: WinXP SP2/Outlook 2003 in cashed mode/Norton AV/VS2005
I have 2 identical sets of tasks, one in the .pst file in my home folder on
the server, second in the Exchange in my profile.
Code below will enumerate all task from .pst with out problems. But when I
will try to enumerate task from Exchange task folder, some of the object
will come back as null.
So far my guess that server antivirus some how has affecting enumeration,
but I will greatly appreciate any another suggestions.
Outlook.Application objOutlook = new Outlook.ApplicationClass();
Outlook.NameSpace objNS = objOutlook.GetNamespace("MAPI");
Outlook.MAPIFolder folder = objNS.PickFolder(); // I will select task folder
int total = 0;
int bad = 0;
int good = 0;
foreach (object obj in folder.Items)
{
Outlook.TaskItem item = obj as Outlook.TaskItem;
total++;
if (item == null)
{
bad++;
}
else
{
good++;
}
}
Sincerely,
Alexander