Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Within a macro script I can retrieve objects and all kinds of information. The API Guide version 11 I can find Application Classes, Document Classes, Sheet Classes and all kinds of properties. With underneath statements I can simply find the Object typename from an object called Test1:
set obj = ActiveDocument.GetSheetObject("Test1")
msgbox Typename(obj)
I cannot find any example of a method to create an new How can I for instance create a new Tablebox object.
Does anyone has an example of how to create an empty Tablebox object?
With regards, Floris
Afaik it's not possible to create an empty table box. It will always need at least one field.
You can use the CreateTableBox method to create the table box:
set TB = ActiveDocument.Sheets("Test1").CreateTableBox
TB.AddField "MyField"
did u chk dis?
Thank Chanty for your reply.
Yes, I check those example macro scripts. I can only find Copy examples, but no creation of any objects.
Afaik it's not possible to create an empty table box. It will always need at least one field.
You can use the CreateTableBox method to create the table box:
set TB = ActiveDocument.Sheets("Test1").CreateTableBox
TB.AddField "MyField"
set TB = ActiveDocument.Sheets("Products").CreateTableBox
TB.AddField "ProductType"
TB.AddField "Product"
There are quite a few Create... methods in the interface library. One for every Graph type for example.
In the API Guide, navigate to sheet "Automation Examples". In listbox Member, search for "Create*".
Best,
Peter
Tnx Gijsbert, this is very usefull.
Tnx Marco, I can use this.
Peter,
I missed that sheet completely, tbnx for the information. Now I can create new objects from scratch.
No problem, we're here to help and we're glad we could.
If you feel your question has been suitably answered, please mark one of the answers before mine as correct. If you feel other answers have been Helpful, please mark them as such. Thanks.
Peter