I am very new in outlook 2007 add in project. I would like to know the event name when I select the start time in calendar of outlook (as below code that I tried for event). Thanks in advance.
namespace OutlookAddIn1
{
public partial class ThisAddIn
{
private Outlook.Explorer currentExplorer = null;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
currentExplorer = this.Application.ActiveExplorer();
currentExplorer.SelectionChange += new Outlook.ExplorerEvents_10_SelectionChangeEventHandler(CurrentExplorer_Event);
}
private void CurrentExplorer_Event()
{
Outlook.MAPIFolder selectedFolder = this.Application.ActiveExplorer().CurrentFolder;
String expMessage = "Your current folder is " + selectedFolder.Name + ".\n";
String itemMessage = "Item is unknown.";
try
{
expMessage = expMessage + itemMessage;
}
catch (Exception ex)
{
expMessage = ex.Message;
}
// MessageBox.Show(expMessage);
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
}
#region VSTO generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
{
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
}
#endregion
}
}