Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to be able to set the width of expression columns in a pivot table in a macro
is this possible
Sure. From API guide:
set chart = ActiveDocument.ActiveSheet.CreateStraightTable
chart.AddDimension "Customer"
chart.AddDimension "ProductType"
chart.AddExpression "sum(Amount)"
set cp = chart.GetProperties
set expr = cp.Expressions.Item(0).Item(0).Data.ExpressionVisual
expr.Label.v = "Sales"
expr.ColWidth = 100
chart.SetProperties cp