Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm looking for a way to change objects IDs in a sheet.
Is there a way to do that with some automation ?
I have tried macro, but it seems that this property is read-only.
Thanks for your attention.
You can change the object ID's as far as I know. Below are two examples from the API Guide document:
rem ** Change unique ID of list box **
set LB = ActiveDocument.GetSheetObject("LB06")
set boxprop=LB.GetProperties
boxprop.Layout.Frame.ObjectId = "Listbox6"
LB.SetProperties boxprop
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
gp.GraphLayout.Frame.ObjectId = "MyChart"
g.SetProperties gp
You can change the object ID's as far as I know. Below are two examples from the API Guide document:
rem ** Change unique ID of list box **
set LB = ActiveDocument.GetSheetObject("LB06")
set boxprop=LB.GetProperties
boxprop.Layout.Frame.ObjectId = "Listbox6"
LB.SetProperties boxprop
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
gp.GraphLayout.Frame.ObjectId = "MyChart"
g.SetProperties gp
Thanks a lot !
I need to dig more in "frame" direction...
Gysbert
I was hunting for a way to change the object id for grids so when they are exported to Excel you place the name of the grid instead of something like "CH263".
Now I was reading your post from 2012 a couple of times over, especially the code above.
My question is, the code above you place this in the script where reloading of all your tables are done, correct?