routine to add a field to my tasks

V

vonclausowitz

Hi All,

I need a routine that will go through all my tasks (800) and add a
custom field named User. It must be a text field.

It must have a restict on non-completed tasks.

Anyone?

Regards
Marco
The Netherlands
 
M

Michael Bauer

Am 2 Oct 2005 01:13:27 -0700 schrieb (e-mail address removed):

Marco, this sample shows a dialog to select a folder an then iterates
through it:

Dim oFolder as Outlook.MapiFolder
Dim oTask as Outlook.TaskItem
Dim obj as Object

Set oFolder=Application.Session.Pickfolder
If not oFolder is Nothing Then
For Each obj in oFolder.Items
If TypeOf obj Is Outlook.TaskItem Then
Set oTask=obj
'...please complete here
Endif
Next
Endif

You now just need to add an If block and check the item´s Complete
property. If it isn´t completed then use the item´s UserProperties.Add
method, for which you can find a sample in the VBA help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top