![]() |
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
|
|||
|
|||
![]()
Hi,
This is my requirement, when I save a task in MSOutlook It should run my own macro to do a process. How do I call my macro when saving a task. Pls help.. |
Ads |
#2
|
|||
|
|||
![]()
Assuming the task has been opened, you get a handle to the item from the
Inspectors.NewInspector() event by using Inspector.CurrentItem. In this case that would be a TaskItem. You then handle the item.Close() or Inspector.Close() event for that item and call your code there. -- 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 "Marc" wrote in message ... Hi, This is my requirement, when I save a task in MSOutlook It should run my own macro to do a process. How do I call my macro when saving a task. Pls help.. |
#3
|
|||
|
|||
![]()
Thanks Ken
But I added a macro like this Public WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Call Initialize_handler End Sub Public Sub Initialize_handler() Set myOlItems = Application.GetNamespace("MAPI").GetDefaultFolder( 13).Items End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) MsgBox ("New Task Added..") End Sub Is this correct?? "Ken Slovak - [MVP - Outlook]" wrote in message ... Assuming the task has been opened, you get a handle to the item from the Inspectors.NewInspector() event by using Inspector.CurrentItem. In this case that would be a TaskItem. You then handle the item.Close() or Inspector.Close() event for that item and call your code there. -- 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 "Marc" wrote in message ... Hi, This is my requirement, when I save a task in MSOutlook It should run my own macro to do a process. How do I call my macro when saving a task. Pls help.. |
#4
|
|||
|
|||
![]()
That looks OK.
-- 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 "Marc" wrote in message ... Thanks Ken But I added a macro like this Public WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Call Initialize_handler End Sub Public Sub Initialize_handler() Set myOlItems = Application.GetNamespace("MAPI").GetDefaultFolder( 13).Items End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) MsgBox ("New Task Added..") End Sub Is this correct?? |
#5
|
|||
|
|||
![]()
How do I install a Macro
in to another user's machine in secured way. "Ken Slovak - [MVP - Outlook]" wrote in message ... That looks OK. -- 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 "Marc" wrote in message ... Thanks Ken But I added a macro like this Public WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Call Initialize_handler End Sub Public Sub Initialize_handler() Set myOlItems = Application.GetNamespace("MAPI").GetDefaultFolder( 13).Items End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) MsgBox ("New Task Added..") End Sub Is this correct?? |
#6
|
|||
|
|||
![]()
For deployment, the best practice is not to use VBA code but to use COM
addins. See http://www.outlookcode.com/article.aspx?id=28. -- 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 "Marc" wrote in message ... How do I install a Macro in to another user's machine in secured way. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Email to Task, move task to 'Other Tasks' folder to sync w/Sharepoint | mitcham | Outlook and VBA | 3 | August 26th 08 06:55 AM |
How to save outlook task as iCalender or vCalender file? | turning | Outlook - Calandaring | 1 | December 7th 06 01:24 PM |
"Save Task Order" in code? | [email protected] | Add-ins for Outlook | 1 | October 6th 06 06:53 AM |
Save Task Order Error | KT | Outlook - Using Forms | 0 | April 7th 06 03:40 PM |
save Recieved task not opening | da-moe | Outlook - General Queries | 1 | February 7th 06 04:40 PM |