Custom Priority

T

Toys

Outlook 2007: There is an defined field, "Custom Prioriy" which is part of
the "All Task Fields" which I'd like to use. I've added to the "Show these
fields. . ." as part of a customised view, but I can't add any text to it (in
the table view) and if I open the task, I can't find the field anywhere.
Using the developer tab, I've tried to add this defined field to a new 'tab',
but still can't add any text. Any ideas?

Thanks,
 
D

Don

Toys said:
Outlook 2007: There is an defined field, "Custom Prioriy" which is part of
the "All Task Fields" which I'd like to use. I've added to the "Show these
fields. . ." as part of a customised view, but I can't add any text to it (in
the table view) and if I open the task, I can't find the field anywhere.
Using the developer tab, I've tried to add this defined field to a new 'tab',
but still can't add any text. Any ideas?

Thanks,
I agree this is very frustrating. In the last version of office I used a
system of A-B-C and 1-2-3 combined to prioritize tasks within categories. I
used the custom priority field to do this. Tasks A1 would be time critical
work related items and B3 were things from home I needed to do when I got
time. I can't figure out how to "turn the field on". It simply doesn't
allow editing. AND IT IS A ROYAL PAIN!!!

Don
 
O

Outlooker

Custom Priority and Custom Status are used by Outlook 2007 when you sync a Sharepoint tasks folder with Outlook.

The MAPI tag for Custom Status is 0x83FC001E and is a string type. The MAPI tag for Custom Priority is 0x83FD001E and is a string type.


Here is some code to read the custom status and priority.


Sub SetCustomPriorityStatus()


Const CdoCustomPriority = &H83FC001E 'Custom Priority
Const CdoCustomStatus = &H83FD001E 'Custom Status


' Declare variables
Dim objSession As MAPI.Session
Dim objFolder As MAPI.Folder
Dim objMessages As MAPI.Messages
Dim objMessage As MAPI.Message
Dim objFields As MAPI.Fields
Dim objField As MAPI.Field
Dim bstrEntryID As String
Dim bstrOriginator As String
Dim bstrFlags As String

' Outlook variables
Dim objExpl As Outlook.Explorer
Dim objSelect As Outlook.Selection
Dim objItem As Object
Dim i As Integer

' Initialize variables
Set objSession = Nothing
Set objFolder = Nothing
Set objMessages = Nothing
Set objMessage = Nothing
Set objFields = Nothing
Set objField = Nothing
Set objExpl = Nothing
Set objSelect = Nothing
Set objItem = Nothing

' Create CDO session and logon
Set objSession = New MAPI.Session
objSession.Logon "", "", ShowDialog:=False, NewSession:=False

' Check CDO session
If Err.Number = 0 Then

' Get selected items in folder
Set objExpl = ThisOutlookSession.ActiveExplorer
Set objSelect = objExpl.Selection

' Check if no item selected
If objSelect.Count = 0 Then

' Display error message and exit
MsgBox "You must select at least one item.", vbInformation
Exit Sub
End If

' Loop through selected Outlook items
For i = 1 To objSelect.Count

' Get selected Outlook item
Set objItem = objSelect.Item(i)

' Get selected Outlook item with CDO
Set objMessage = objSession.GetMessage(objItem.EntryID, objItem.Parent.StoreID)
Debug.Print objMessage.Type & " "; objMessage.Subject
' Check message class
If Left(objMessage.Type, 15) = "IPM.Task" Then

' Get fields collection
Set objFields = Nothing
Set objFields = objMessage.Fields
If Not objFields Is Nothing Then


Set objField = Nothing
'On Error Resume Next
Set objField = objFields.Item(CdoCustomPriority)
strCPriority = objField.Value
Set objField = objFields.Item(CdoCustomStatus)
strCStatus = objField.Value
Debug.Print strCPriority & vbTab & strCStatus


Set objField = Nothing
On Error Resume Next

' Check for errors
If Err.Number <> 0 Then

' Display message
MsgBox "Could not enable RTF for " & objMessage.Subject & vbCrLf & _
" Error: " & Err.Number & " " & Err.Description, vbCritical
End If
End If
End If
Next

' Logoff
objSession.Logoff

End If

' Tidy up
Set objSession = Nothing
Set objFolder = Nothing
Set objMessages = Nothing
Set objMessage = Nothing
Set objFields = Nothing
Set objField = Nothing
Set objExpl = Nothing
Set objSelect = Nothing
Set objItem = Nothing

End Sub
 

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