Outllook export app problem

Hello, I have an application that import data to a database from outlook. Generally the information I want is in the Outllok calendar.
This application works fine in some computers, but in others gives an strange error message. I've narrow the problem to one single line.

This is my code:

Outlook.Application oApp =new Outlook.Application();

Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");

oNS.Logon(Missing.Value, Missing.Value,
true,true);

Outlook.MAPIFolder oCalendar = oNS.GetDefaultFolderOutlook.OlDefaultFolders.olFolderCalendar);

The error is on the second line of code, the error says that cannot get the namespace. Meanwhile I've searched the web and there is no other parameter that i can put than MAPI, so i feel like i'm in a dead end.
Can anybody help?

[1131 byte] By [Azazel] at [2008-1-10]
# 1
Hi,

I think its due to the MAPI subsystem and its configuration on different machines.
Please go through the following KB article for more details:
http://support.microsoft.com/?id=288836

Check for the MAPI32.dll on the machines where it is not working.

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...
# 2

Hi,

Erm... a short introduction of myself ...

I'm a newbie in this field area of programming and was asked to do a programming using the C# or visual basic studio

The programming is that to extract out it's own computer M.S outlook calendar data but i have no clue on what to do until i found this website .Could appreciate that if you provide me with the code and explaination so that i can try it out and ask qns about it.Hopefully you guys can help out...

By the way, the programming cannot have anything to do with the microsoft exchange server which i was told to do so.

Best regards,

ClaudeX

ClaudeX at 2007-8-21 > top of Msdn Tech,Feedback for forums and MSDN websites,Off-Topic Posts (Do Not Post Here)...