Outlook How to fire Drag and Drop event of outlook appointment using C#?

Joined
Nov 10, 2011
Messages
5
Reaction score
0
Hi friends....

How can we fire Drag and Drop event of outlook appointment using C#. My actual requirment is user don't drag and drop the appointment. I need to cancel the drag and drop.

Bobbin
Thanks & Regards
 
Outlook already has a feature to disable drag and drop.No need for any C#
 
Hi Evan

Actually i have an outlook addin project. In this project i am downloading and uploading the appointment items from CRM to outlook and to opposite direction. Some appointment items download from CRM dont change in outlook. So i need to cancel the edit option. So i cancel the write function

Code:
public void NewItem_Write(ref bool Cancel)
        {
            Cancel = true;
        }

this function only work after we select the appointment and then drag. If we directly drag an appointment it will not fire. This is my problem. please help me to over come this problem.

thanks
Bobbin
 
Check out this code..... it might be useful for you.
public partial class ThisAddIn
{
private Outlook.Application outApp;
private Outlook.NameSpace _nameSpace;
private Outlook.MAPIFolder _calendarFolder;

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
outApp = this.Application;

_nameSpace = outApp.GetNamespace("MAPI");

_calendarFolder =
_nameSpace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);

_calendarFolder.Items.ItemAdd += new
ItemsEvents_ItemAddEventHandler(Items_ItemAdd);
}

void Items_ItemAdd(object Item)
{
MessageBox.Show("Item Added");
}
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
{
_calendarFolder.Items.ItemAdd -= new
ItemsEvents_ItemAddEventHandler(Items_ItemAdd);
outApp = null;

}
}

For more details please check out this link..

http://www.codeproject.com/KB/office/outlook_drag_drop_in_cs.aspx

http://forums.asp.net/t/1138955.aspx
 
Back
Top