-
January 21st, 2010, 08:02 AM
#1
Accessing outlook appointments
Hi All,
I have developed a small application in MFC which accesses a C# dll. This C# dll reads outlook calendar appointments using Outlook object model. The following code works fine except that it prompts a security warnning "A program is trying to access email address information stored in outlook......" Allow/Deny. I wanted to avoid this security prompt. I googled a lot. I read that if I use Extended MAPI/CDO I won't get this warning but could not get some proper code guidence. So if somebody can tell me how can I restructure my code to use Extended MAPI. I have also read that this warning does not com for trusted COM-addins but I don't want my application to be an Outlook Addin. So please help me
Code:
Microsoft.Office.Interop.Outlook.Application outLookApp = new Microsoft.Office.Interop.Outlook.Application();
NameSpace nms = outLookApp.GetNamespace("MAPI");
MAPIFolder mpiFolder = nms.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
foreach (AppointmentItem task in mpiFolder.Items)
{
//creating the appointment data string.
String subject = task.Subject;
String location = task.Location;
String body = task.Body;
.....
}
-
January 21st, 2010, 08:28 AM
#2
Re: Accessing outlook appointments
I think that response is built in to Outlook. I myself have had lots of issues with this message, so, I'm also open to suggestions. But in my honest opinion, I don't think there is hope for you.
-
January 21st, 2010, 08:54 AM
#3
Re: Accessing outlook appointments
But i have read that if we obtain application object through some session object then this message does not appear. While looking for application object it loads some default security profile.So it should be possible to do it without that warning. Some other application also do it(for ex- Google calendar sync).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|