views:

41

answers:

1

This question is related to my question regarding inserting contacts to Outlook.

Nobody was able to suggest any way of doing this beside beside OOM (Outlook Object Model) or Microsoft Outlook object library 12.0, so I ended up using OOM.

When I try to insert 1000 records my CPU usage goes to 100%. I am closing the contact, do I have to dispose of or close anything else?

Also, if my program is running and Outlook is open, if somebody closes Outlook then the program errors out.

+1  A: 

Hi Guys,

I was able to solve this by using following 2 lines. Dont know how, but it got solved

GC.WaitForPendingFinalizers(); GC.Collect();

Regards

Mohit Thakral

Mohit