Hi all,
How can I determine if a pivot table is active in the document using vbscript?
My end users need to expand/collapse all the fields in different pivot tables with just the click of a button.
Example:
Sub ExpandPivot()
SET Pivot = ActiveDocument.GetSheetObject(“X”)
SET pvt = Pivot.GetProperties
SET Pivot2 = ActiveDocument.GetSheetObject(“Y”)
SET pvt2 = Pivot.GetProperties
If pvt.IsActive then
‘Perform Action 1
Else
‘Perform Action 2
End if
End sub
Thanks for your assistance.