Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two charts in container object. i want to show the first chart as default always.
But if i select the second chart and save the document and open again it is showing the second one.
i want show the first chart as default.
Thanks in advance.
That's simple - always select the first chart before saving then...
Otherwise maybe it could work if you use an OnOpen trigger with the ActivateObject action. (have not tried it myself)
hope this helps
/Gandalf
For setting the default index of the container when opening the document, create a new action as follows.
1. In the main menu, go to Settings\Document Properties
2. In the Document properties window, go to the Triggers tab, click on the OnOpen option in the Document Event Triggers window and click on the Edit Action button.
3. In the Actions window, add a new External\Run Macro action and then enter the macro name SetContainerIndexDefault
Use this macro for setting the default index. Note that you must replace "CT06" with the Object Id chosen to be the default in your container.
sub SetContainerIndexDefault
Set ContainerObj= ActiveDocument.GetSheetObject("CT06")
Set ContainerProp=ContainerObj.GetProperties
ActiveChartIndex=0
ContainerProp.SingleObjectActiveIndex = ActiveChartIndex
ContainerObj.SetProperties ContainerProp
End Sub