Speed up Tasks on Your Windows Mobile Smartphone

One of my biggest frustrations with the Windows Mobile task application is that it synchronizes your completed tasks. After a while, this greatly outnumbers your active tasks, making the task app really slow. So I periodically move my completed tasks to a separate task folder (I like to have them around for searching). Alternatively, you could just delete them once a week or so. The following Outlook macro code can be used to move all the completed tasks in your tasks folder to the first tasks subfolder.

<!– code formatted by http://manoli.net/csharpformat/ –>

    Dim fld As Folder
    Dim fldComplete As Folder

    Set fld = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderTasks)
    Set fldComplete = fld.Folders.Item(1)
    For x = fld.Items.Count To 1 Step -1
        Dim objTask As TaskItem
        Set objTask = fld.Items(x)
        If (objTask.Complete) Then
            objTask.Move fldComplete
        End If
    Next x