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

Thanks for the code. It gives the same message. This has to do something
with the shared nature of the task. I can delete a shared task via code if
i have the item selected in the window. For example I have a user PMO who
shares it's tasks and I'm on owner. If I select that task folder then I can
delete. It's when I'm referring to a shared task folder that is not in the
current window.

I'm using Outlook 2007. The code is running in that environment, VBA.


"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