Accessing outlook appointments
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Accessing outlook appointments

  1. #1
    Join Date
    Jun 2007
    Location
    New Delhi
    Posts
    70

    Unhappy 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;
    .....
    }

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,090

    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.

  3. #3
    Join Date
    Jun 2007
    Location
    New Delhi
    Posts
    70

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center