A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Save task



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 17th 09, 05:39 AM posted to microsoft.public.outlook.program_vba
Marc[_7_]
external usenet poster
 
Posts: 19
Default Save task

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  
Old August 17th 09, 03:39 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Save task

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  
Old August 18th 09, 05:36 AM posted to microsoft.public.outlook.program_vba
Marc[_7_]
external usenet poster
 
Posts: 19
Default Save task

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  
Old August 18th 09, 02:58 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Save task

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  
Old August 18th 09, 03:12 PM posted to microsoft.public.outlook.program_vba
Marc[_7_]
external usenet poster
 
Posts: 19
Default Save task

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  
Old August 18th 09, 03:57 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Save task

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.