View Single Post
  #7  
Old October 4th 07, 05:39 PM posted to microsoft.public.outlook.program_vba
Job[_2_]
external usenet poster
 
Posts: 14
Default Delete Shared Task

The purpose of the code is to do the following:

We want to use the tasks capability of Outlook and Exchange for project
managment. The only way we've found to be able to assign tasks and have a
central location is to assign a dummy user 'PMO' which shares it's tasks and
give every user ownership rights. So each task that is assigned to users is
essentially from PMO. The difficulty comes from the inability to recall the
task. If I've assigned the task to UserA and I decided that I wanted to
change the hours, not only on the main PMO, but also on the users machine,
I've either got to have each of the user's shared folders avail to select
and change (which would be too confusing for a lot of our users) or we came
up with the idea to have a button or something that essentially (when in the
PMO view) copies the selected task and fills in the custom fields to the new
copied version of the task. As the task is copied it reassigns the task to
PMO as the owner. Now we need to get rid of the task on the UserA's personal
task list, thus the code you are helping with. The copied task would then
be re-assigned to the user with the relevant changes.

If we were able to effectivly recall the task it would make the process
easier. However, I have all of the code to do everything described above
minus the deleting of the original task off of the users personal task list
to whom the task was orignially assigned.


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Try this:

a = objTask.EntryID
b = objTask.Parent.StoreID

Set objTask = Nothing

Set objTask = oNS.GetItemFromID(a, b)
If Not (objTask Is Nothing) Then
objTask.Delete
Set objTask = Nothing
End If

What version of Outlook? Where is this code running? It's obviously either
VB6 or VBA code.

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


"Job" wrote in message
...
Ken,

Your giving me too much credit. I'm not sure how to do what you've
suggested. Would it be like this?

a = objTask.Item("EntryID").Value
b = objTask.Item("StoreID").Value

Set objTask = Nothing
Set objTask = ...
not sure where to go..pretty new to this...thanks for your help



Ads
 

Loans - Debt Consolidation - Car Loan - Problem Mortgage - Free Ringtones