Hello!
I think, I have one simple question for you guys, but I don't get the answer
by myself!
I would like to import all "Outlook - Contacts" into my application and when
I use "foreach" it works! But with "Outlook 2002" I must use a "for - Loop"
and that is my problem! I have three contacts in Outlook and when I import
the "contacts", it gives me everytime only two contacts!
Here is my "for - loop" and I hope one of you could find my (simple) mistake!
*********
int zaehler;
object item = (MSOutlook.Cont actItem)objFold er.Items.GetFir st();
for (zaehler = 0; zaehler <= objFolder.Items .Count; zaehler++)
{
appItem = item as MSOutlook.Conta ctItem;
if (appItem != null)
{
importContactIt ems.Tables[0].Rows.Add(new object[] {
appItem.LastNam e, appItem.FirstNa me, appItem.
HomeAddressStre et,
appItem.HomeAdd ressPostalCode, appItem.HomeAdd ressCity});
item = (MSOutlook.Cont actItem)objFold er.Items.GetNex t();
zaehler++;
}
}
**********
Regards
Corey
P.S. Sry, for my bad english! *g