Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to know if there is a way to add a chart to a container....
I know how to select the container with my macro but I don't know if there is a function which can do what I want.
Thank you
Thomas
My question has changed a little...
I can add an element to a container with this code:
Set ContainerObj =ActiveDocument.GetSheetObject("CT01")
set ContProp=ContainerObj.GetProperties
ContProp.ContainedObjects.Add
ContProp.ContainedObjects.Item(0).Def.ObjectId = "Document\CHBI"
ContProp.ContainedObjects.Item(0).Text.v = "Test"
ContainerObj.SetProperties ContProp
But like this, I always paste the chart to the first position on my container et so I can't add, each time I use my macro.
In fact, I would like to add a chart to the container each time I clik on a button.
So I have to find the way to count how many chart are already in the container to add one.