1 Reply Latest reply: Mar 26, 2010 10:42 AM by Frederik RSS

    Expand/Collapse Pivot Table using a Macro

      Hi everyone

      The command PivotAlwaysFullyExpanded works well for expanding a Pivot Table completely, but when collapsing the table, it can only collapse it down to the previous manual selection of [+] and [-]. I can't find any equivalent commands for collapsing tables.

      Example using PivotAlwaysFullyExpanded for expanding/collapsing a table with one button:


      sub CollapseExpandPivot

      set chart = ActiveDocument.GetSheetObject("CH01")

      set gp = chart.GetProperties not gp.TableProperties.PivotAlwaysFullyExpanded

      end sub

      How do i fully collapse a Pivot Table with multiple dimensions using a macro?


      Best regards