locked
Create and display mailItem via Redemption RRS feed

  • Question

  • Hi,

    WinXP SP2, Outlook 2003, .NET 2.0 C#.


    I have win application that one of it feature is open mailItem window
    ( inspector ).
    Currently i do the next:

    Microsoft.Office.Interop.Outlook.Application app = new
    Microsoft.Office.Interop.Outlook.Application();

    MailItem mItem =
    (MailItem)app.OutlookInstance.CreateItem(OlItemType.olMailItem);
    mItem.Subject = "bla bla bla";
    ............
    ..........

    mailItem.Display(false);

    In case Outlook isn't running it's automatically starts and after
    pressing the Send button on the inspector the process closed.
    The snippet above works pretty good.

    My question is how can i do the same but via Redemption and not using
    OOM at all.

    Outlook will be installed but not sure if it will be running when user
    will click to write mail.


    Thank you.

    • Moved by Cindy Meister MVP Friday, October 31, 2008 8:08 AM off-topic in VSTO forum (Moved from Visual Studio Tools for Office to Off-Topic Posts (Do Not Post Here))
    Saturday, October 25, 2008 3:00 PM

Answers

  • Hi EB78,

    I think you put the post in a wrong forum ,third party library is not support here.

    I'm still going to reply your question,but not to encourage to post this kind of questions in VSTO forum.

    Please check the following code by Ken Slovak

    RDOSession session = new RDOSession();  
    session.Logon("", "", false, false, null, false);  
     
    RDOFolder folder =  
    session.GetDefaultFolder(rdoDefaultFolders.olFolderContacts);  
     
    RDOMail item = folder.Items.Add("IPM.Contact");  
     
    RDOContactItem contact = (RDOContactItem)item;  
     
    More often I'd do it this way:  
     
    RDOContactItem contact = (RDOContactItem)folder.Items.Add("IPM.Contact"); 
    Here's the link.
    http://www.tech-archive.net/Archive/Outlook/microsoft.public.outlook.interop/2007-10/msg00011.html


    Thanks
    • Marked as answer by Tim Li Friday, October 31, 2008 6:05 AM
    Friday, October 31, 2008 6:03 AM