![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
When drag a mail item and drop to some other folder item_add event is called
b'se an item is added to a folder. But before item_add What's actual event for drag and drop in outlook? Item_add event is called for all cases like saving a mail, sending a mail, moving a mail. But if i want to call item_add event for special case(drag and drop) then what i need to do. |
Ads |
#2
|
|||
|
|||
![]()
There are no drag and drop events in the Outlook object model, as a look at
the Object Browser will tell you. You'd have to go down to the Windows message hook level and hook all such messages using Win32 API calls and a message hook. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... When drag a mail item and drop to some other folder item_add event is called b'se an item is added to a folder. But before item_add What's actual event for drag and drop in outlook? Item_add event is called for all cases like saving a mail, sending a mail, moving a mail. But if i want to call item_add event for special case(drag and drop) then what i need to do. |
#3
|
|||
|
|||
![]()
Ok i think item_add event is enough to handle the case. But here there is a
problem. When a new mail arrives application_newmail event(event number 0xfba7 in c++) is called.And when move a mail from one folder to another folder then also application_newmail event is called. I'm facing the problem if a exchange user has some mails in its inbox and i create profile for this user and login to user using outlook. Here application_newmail event will call until it receives all mails in inbox(outlook looks like hang until all mail receive). Is there any way to recognize this case? Means can i set a bool which tells me that outlook has received all mails and ready for any action now? When launch outlook OnStartupComplete is called and return before outlook receive new mails. Is there any other function which tells outlook is idle now. Or can we differentiate in application_newmail event for the cases when new mail arrive or move a mail from one folder to another. Supp"Ken Slovak - [MVP - Outlook]" wrote in message ... There are no drag and drop events in the Outlook object model, as a look at the Object Browser will tell you. You'd have to go down to the Windows message hook level and hook all such messages using Win32 API calls and a message hook. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... When drag a mail item and drop to some other folder item_add event is called b'se an item is added to a folder. But before item_add What's actual event for drag and drop in outlook? Item_add event is called for all cases like saving a mail, sending a mail, moving a mail. But if i want to call item_add event for special case(drag and drop) then what i need to do. |
#4
|
|||
|
|||
![]()
If you are getting NewMail() in cases other than when email is delivered to
the Inbox of the primary mailbox then something is very wrong. That event only fires in that case, and only then at intervals, allowing you to miss incoming items. A better event to use would be either Inbox.Items.ItemAdd() or NewMailEx(). NewMailEx() gives you a delimited list of the EntryID's of items that have come in since the last time that event fired. ItemAdd() has a limitation common to most MAPI events where it won't fire at all if more than 16 items come in at once. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... Ok i think item_add event is enough to handle the case. But here there is a problem. When a new mail arrives application_newmail event(event number 0xfba7 in c++) is called.And when move a mail from one folder to another folder then also application_newmail event is called. I'm facing the problem if a exchange user has some mails in its inbox and i create profile for this user and login to user using outlook. Here application_newmail event will call until it receives all mails in inbox(outlook looks like hang until all mail receive). Is there any way to recognize this case? Means can i set a bool which tells me that outlook has received all mails and ready for any action now? When launch outlook OnStartupComplete is called and return before outlook receive new mails. Is there any other function which tells outlook is idle now. Or can we differentiate in application_newmail event for the cases when new mail arrive or move a mail from one folder to another. |
#5
|
|||
|
|||
![]()
There are 2 newmail events in application. I dont know exact functions in
VB. I'm using c++. newmail(0xf003) this is call when we create a new mail in outlook newmailex(0xfba7) this is call when a new mail receives in outlook for following cases 1. new mail receive in inbox folder 2. we create a new mail and save/send it 3. we move a mail from one folder to another folder For all cases outlook first calls application_newmailex then Items.ItemAdd NewMailEx() gives you a delimited list of the EntryID's of items that have come in since the last time that event fired. Please explain how EntryID's can help? The critical case is if a exchange user has some mails already in it and we create a new profile for this user in outlook and login to outlook then application_newmailex and Items.ItemAdd will be call for all mails which come to inbox until outlook restored all old mails. "Ken Slovak - [MVP - Outlook]" wrote in message ... If you are getting NewMail() in cases other than when email is delivered to the Inbox of the primary mailbox then something is very wrong. That event only fires in that case, and only then at intervals, allowing you to miss incoming items. A better event to use would be either Inbox.Items.ItemAdd() or NewMailEx(). NewMailEx() gives you a delimited list of the EntryID's of items that have come in since the last time that event fired. ItemAdd() has a limitation common to most MAPI events where it won't fire at all if more than 16 items come in at once. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... Ok i think item_add event is enough to handle the case. But here there is a problem. When a new mail arrives application_newmail event(event number 0xfba7 in c++) is called.And when move a mail from one folder to another folder then also application_newmail event is called. I'm facing the problem if a exchange user has some mails in its inbox and i create profile for this user and login to user using outlook. Here application_newmail event will call until it receives all mails in inbox(outlook looks like hang until all mail receive). Is there any way to recognize this case? Means can i set a bool which tells me that outlook has received all mails and ready for any action now? When launch outlook OnStartupComplete is called and return before outlook receive new mails. Is there any other function which tells outlook is idle now. Or can we differentiate in application_newmail event for the cases when new mail arrive or move a mail from one folder to another. |
#6
|
|||
|
|||
![]()
You've lost me completely.
There are both NewMail() and NewMailEx() (for VB, VBA, VB.NET and C#). I don't do C++ but my guess is that the event with the higher index is NewMailEx(). However, both events should only fire when new mail is delivered to the default Inbox in that Outlook profile. If you are seeing anything else then you're seeing something that I've never heard of in the Outlook object model and I have no idea what's going on. Just look at the object model in the Object Browser in the Outlook VBA project to see what I'm talking about. NewMailEx() should only fire in case 1, never in your cases 2 & 3. The list of EntryID's you get from NewMailEx() lets you access each new mail that came in, which is what I thought we were talking about. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... There are 2 newmail events in application. I dont know exact functions in VB. I'm using c++. newmail(0xf003) this is call when we create a new mail in outlook newmailex(0xfba7) this is call when a new mail receives in outlook for following cases 1. new mail receive in inbox folder 2. we create a new mail and save/send it 3. we move a mail from one folder to another folder For all cases outlook first calls application_newmailex then Items.ItemAdd NewMailEx() gives you a delimited list of the EntryID's of items that have come in since the last time that event fired. Please explain how EntryID's can help? The critical case is if a exchange user has some mails already in it and we create a new profile for this user in outlook and login to outlook then application_newmailex and Items.ItemAdd will be call for all mails which come to inbox until outlook restored all old mails. |
#7
|
|||
|
|||
![]()
You are correct it's NewMailEx(0xfba7) which is call when a new mail receive
in Inbox folder. Lets forget about NewMail(0xf003) it's not related here and it's only call when we click on File-New Mail item in outlook. NewMailEx is called when user receives new mails in its inbox folder. Or if user already contains some mails and we create its profile in outlook. When we login to user NewMailEx is call which receive all existing mails(which are on server) in outlook. But in my outlook(user profile is created using exchange server) NewMailEx is also called when after creating a new mail we save it, or we move an existing mail from one folder to another. So i still dont know by which action item_add event is called. I think the only way(as per myknowledge) is to implement drag and drop. You have already said it should do using windows API. I think i should implement drag and drop in active inspector. I dont know how to do it. Is there any link available on net? "Ken Slovak - [MVP - Outlook]" wrote in message ... You've lost me completely. There are both NewMail() and NewMailEx() (for VB, VBA, VB.NET and C#). I don't do C++ but my guess is that the event with the higher index is NewMailEx(). However, both events should only fire when new mail is delivered to the default Inbox in that Outlook profile. If you are seeing anything else then you're seeing something that I've never heard of in the Outlook object model and I have no idea what's going on. Just look at the object model in the Object Browser in the Outlook VBA project to see what I'm talking about. NewMailEx() should only fire in case 1, never in your cases 2 & 3. The list of EntryID's you get from NewMailEx() lets you access each new mail that came in, which is what I thought we were talking about. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... There are 2 newmail events in application. I dont know exact functions in VB. I'm using c++. newmail(0xf003) this is call when we create a new mail in outlook newmailex(0xfba7) this is call when a new mail receives in outlook for following cases 1. new mail receive in inbox folder 2. we create a new mail and save/send it 3. we move a mail from one folder to another folder For all cases outlook first calls application_newmailex then Items.ItemAdd NewMailEx() gives you a delimited list of the EntryID's of items that have come in since the last time that event fired. Please explain how EntryID's can help? The critical case is if a exchange user has some mails already in it and we create a new profile for this user in outlook and login to outlook then application_newmailex and Items.ItemAdd will be call for all mails which come to inbox until outlook restored all old mails. |
#8
|
|||
|
|||
![]()
You'd have to research that yourself, I'm not familiar with any such
examples. I can see NewMailEx() firing when items are downloaded from the Exchange server on startup only if the profile is cached. If online the items are already there in Inbox. I still have no idea why you'd see that event in the other circumstances you mention. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Ashish" wrote in message ... You are correct it's NewMailEx(0xfba7) which is call when a new mail receive in Inbox folder. Lets forget about NewMail(0xf003) it's not related here and it's only call when we click on File-New Mail item in outlook. NewMailEx is called when user receives new mails in its inbox folder. Or if user already contains some mails and we create its profile in outlook. When we login to user NewMailEx is call which receive all existing mails(which are on server) in outlook. But in my outlook(user profile is created using exchange server) NewMailEx is also called when after creating a new mail we save it, or we move an existing mail from one folder to another. So i still dont know by which action item_add event is called. I think the only way(as per myknowledge) is to implement drag and drop. You have already said it should do using windows API. I think i should implement drag and drop in active inspector. I dont know how to do it. Is there any link available on net? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Email Drag and Drop Event in outlook | Elanchezhian.R | Outlook and VBA | 5 | July 24th 09 11:25 AM |
Drag & Drop Email Message to Appt Doesn't Drop Attachment | veejaycee | Outlook - Calandaring | 2 | October 9th 08 01:49 PM |
Outlook Drag Drop | [email protected] | Add-ins for Outlook | 0 | March 27th 07 07:37 AM |
drag drop from outlook attachments broken | Mark G. | Outlook - General Queries | 2 | December 5th 06 03:24 AM |
How do I drag and drop a name from Word to Outlook? | sleepyhollowkaren | Outlook - Using Contacts | 0 | February 27th 06 06:02 PM |