Is there a way to enable the option "Display labels from the next field in the same column (compact form) in VBA?
This only enables the "Show item labels in outline form"
ActiveSheet.PivotTables("Name of pivot table").PivotFields("Name of pivot field").LayoutForm = xlOutline

The syntax should be: