outlook 2003 error

Z

zzozo

Hi, All.

I wrote an addin in c#.net for outlook 2003 on Windows XP. It works ok
on developer machine, and it does, too, on Win 2000 + OL 2003.
However, it doesn't on Win XP + OL 2003. I used the installer from
setup project.

The addin is trying to access the Contact folder, and create a list for
contact names.

====================================================================
NameSpace outlookNS = applicationObject.GetNamespace("MAPI");
MessageBox.Show("called: GetNamespace()");

MAPIFolder theContacts =
outlookNS.GetDefaultFolder(OlDefaultFolders.olFolderContacts);
===> MessageBox.Show("called: GetDefaultFolder()");

string contactList = "==== Contact List ====\n\n";
foreach(ContactItem contact in theContacts.Items)
{
contactList += contact.FirstName + " " + contact.LastName + "\n";
}
MessageBox.Show(contactList);
=====================================================================

The failure case (win xp + ol 2003), I can get the message "called:
GetDefaultFolder()", but after that I doesn't work... Is there any
problem with foreach ???


Any clue will be very appreciated!!!

Thanks,
Seungchan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top