- Joined
- Aug 24, 2017
- Messages
- 1
- Reaction score
- 0
Hello,
I wrote a simple code to add an Index number to every task in the task folder. I created a custom field called "index". The code loops through all of the tasks and just puts the number of the task (not sure what the order is) in the "index" field of each task. For some reason, it only works if there is some value assigned to the "index" field. If it's empty, it does nothing.
For i = 1 To objFolder.Items.Count
Set xitem = objFolder.Items(i)
xitem.UserProperties.Find("index") = i
xitem.Save
Next i
Any help would be appreciated.
Thank you
I wrote a simple code to add an Index number to every task in the task folder. I created a custom field called "index". The code loops through all of the tasks and just puts the number of the task (not sure what the order is) in the "index" field of each task. For some reason, it only works if there is some value assigned to the "index" field. If it's empty, it does nothing.
For i = 1 To objFolder.Items.Count
Set xitem = objFolder.Items(i)
xitem.UserProperties.Find("index") = i
xitem.Save
Next i
Any help would be appreciated.
Thank you