'This macro adds or removes a number of leading spaces 'for each task name so that reports 'will show tasks as being indented '"indentme" adds leading spaces to task names '"unindentme" removes leading spaces from task names 'Copyright Jack Dahlgren, March 2002 'Version History 'May 22, 2003 - moved unindent functionality into main macro ' - added ability to input number of spaces interactively Sub indentme() Dim t As Task Dim ts As Tasks Dim spaces, padding As String Dim i, j As Integer Set ts = ActiveProject.Tasks 'Ask user how many spaces they want spaces = InputBox("Enter the number of spaces to indent" _ & Chr(13) _ & "Leave Blank to remove leading spaces") 'Go through all non-blank tasks For Each t In ts If Not t Is Nothing Then 'remove any leading spaces t.Name = Trim(t.Name) 'if user input is valid and not zero add spaces If spaces > 0 And spaces < 10 Then padding = "" For i = 1 To (t.OutlineLevel - 1) For j = 1 To spaces padding = padding & " " Next j Next i t.Name = padding & t.Name End If End If Next t End Sub