Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a straight table chart which gets created dynamically. Now I need to turn on 'Searchable' property for these expressions.
Please guide me to get this done.
Here is the code where I am creating this straight table:
Sub CreateDataTableChart
on error resume next
SET objOldChart= ActiveDocument.GetSheetObject("DATATAB")
objOldChart.Close
SET objChart = ActiveDocument.Sheets("Data").CreateStraightTable
strFields = ActiveDocument.GetVariable("vFields").GetContent.String
'arrFields = Split(strFields, ActiveDocument.GetVariable("vDelimit").GetContent.String)
'Field in Fields variable are always comma separeted
arrFields = Split(strFields, ",")
objChart.AddDimension "RECNO"
For i = 0 to UBound(arrFields)
strColumnName = "["&arrFields(i)&"]"
objChart.AddExpression strColumnName
Next
objChartProp = objChart.GetProperties
SET objExpr = objChartProp.Expressions
objChartProp.GraphLayout.Frame.ObjectID = "DATATAB"
objChartProp.GraphLayout.WindowTitle.v= "Data Table"
' Uncomment below if you want to give different lable for RECNO
' objChartProp.Dimensions(0).Title.v="Record#"
For i = 0 to UBound(arrFields)
objExpr.Item(i).Item(0).Data.ExpressionVisual.Label.v=arrFields(i)
objExpr.Item(i).Item(0).Data.ExpressionData.UsePartialSum = false 'No Totals
'Searchable --------------------------??????????
Next
objChartPos=objChart.GetRect
objChartPos.Top = 10
objChartPos.Left =400
objChart.SetProperties objChartProp
objChart.SetRect objChartPos
objChart.SetPixWidths 0,w
objChart.EqualPixWidths 1
End Sub
Thanks,
Manoj
Try it with:
objExpr.Item(i).Item(0).Data.ExpressionVisual.Searchable = true
- Marcus
'Searchable' is property of ExpressionVisual. It is working now.
objExpr.Item(i).Item(0).Data.ExpressionVisual.Searchable=true
Thanks,
Manoj
Try it with:
objExpr.Item(i).Item(0).Data.ExpressionVisual.Searchable = true
- Marcus
Yes that worked ... Thankyou