Creating Follow up email Reminder in Outlook Shared Add-ins

1.4k views Asked by At

I am using VS 2010 , Dot Net Framework 2.0 . I have created a project in Extensibility->Shared Add-ins for Outlook.

I want to create a follow up email reminder using Com Add-in can any body help me out how to do it. I have written some code and attached Follow Flag in the Email but cannot find a way to attach reminder on it, invoke a reminder,Check if Follow Flag is already attach to the mailitem and can i override the Default reminder window with my own custom window. Here is the code.

explorer = this.Application.ActiveExplorer();
        explorer.SelectionChange += new Outlook.ExplorerEvents_10_SelectionChangeEventHandler(explorer_SelectionChange);

        void explorer_SelectionChange()
    {
        if (connectingMailItem != null && connectingMailItem is Outlook.MailItem)
        {
            Marshal.ReleaseComObject(connectingMailItem);
            // Perform a Garbage Collection
            GC.Collect();
            connectingMailItem = null;
            return;
        }
        foreach (object selectedItem in explorer.Selection)
        {
            connectingMailItem = selectedItem as Outlook.MailItem;
            break;
        }
        if (connectingMailItem != null && connectingMailItem is Outlook.MailItem)
        {                
            connectingMailItem.FlagRequest = "Follow up";             
            connectingMailItem.Save();
        } 
    }

What should be added to this code to achieve the my goal Thank You

This is What Should be done to create Follow up reminder

if (connectingMailItem.IsMarkedAsTask == true)
            {
                connectingMailItem.ClearTaskFlag();
            }
            else
            {                    
                connectingMailItem.FlagRequest = "Follow up";
                connectingMailItem.FlagIcon = Outlook.OlFlagIcon.olNoFlagIcon;                    
                connectingMailItem.MarkAsTask(Outlook.OlMarkInterval.olMarkToday);
                connectingMailItem.ReminderTime = DateTime.Now.AddMinutes(1);
                connectingMailItem.ReminderOverrideDefault = true;
                connectingMailItem.ReminderSet = true;
                connectingMailItem.Save();
            }

But i was not able to override the default Reminder window and show custom winform

0

There are 0 answers