'Globals Dim oOutlook Dim oNamespace Dim oFolder Dim aItems Dim oTask Dim szBuffer Dim aPriority Dim aStatus Dim aPriorityColors Dim aStatusColors aPriority = Array("Low", "Medium", "High") aStatus = Array("Not Started", "In Progress", "Completed", "Waiting on someone else", "Deferred") aPriorityColors = Array("none", "yellow", "red") aStatusColors = Array("red", "green", "green", "yellow", "blue") 'Constants Const olMailItem = 0 Const olTaskItem = 3 Const olFolderTasks = 13 'Create Outlook, Namespace, Folder Objects and Task Item Set oOutlook = CreateObject("Outlook.application") Set oNamespace = oOutlook.GetNameSpace("MAPI") Set oFolder = oNamespace.GetDefaultFolder(olFolderTasks) Set aItems = oFolder.Items szBuffer = "
Project | Task | Priority | Status | Due Date | Status | Notes | |
---|---|---|---|---|---|---|---|
" & oTask.BillingInformation & " | " szBuffer = szBuffer & "" & oTask.Subject & " | " szBuffer = szBuffer & "" & aPriority(oTask.Importance) & " | " szBuffer = szBuffer & "" & aStatus(oTask.Status) & " | " if oTask.DueDate = "1/1/4501" Then 'Outlook stupidity szBuffer = szBuffer & "None | " else szBuffer = szBuffer & "" & oTask.DueDate & " | " end if szBuffer = szBuffer & "" & oTask.PercentComplete & " | " szBuffer = szBuffer & "" & oTask.Body & " | " szBuffer = szBuffer & "