Thanks for the reply.
Apologies my question did not depict the scenario corrrectly.
What I am trying to achieve is as follows,
1.)I have a few variables based on which I want to hide and show expressions in a pivot table.
2.)I am trying to write a macro using which I want to achieve point 1.
So,the macro i am writing looks something this but failing when I am trying to get the value of the variable
varNo = ActiveDocument.GetVariableDescriptions.Count - 1
For i = 0 to varNo
--This is the part where i m failing
IF ActiveDocument.GetVariableDescriptions.Item(i) .GetContent.String = "1" THEN
Chart.SetPixWidth (4), 100
Chart.SetPixWidth (4), 0
Thanks for your help in advance.