To start out, you would have to know the sheet size. This may help.
Set objActiveDoc = swApp.ActiveDoc Set swDraw = objActiveDoc Set swSheet = swDraw.GetCurrentSheet strDrawSize = swSheet.GetProperties(0) Select Case strDrawSize Case 0, 1 strDrawSize = "A" Case 2 strDrawSize = "B" Case 3 strDrawSize = "C" Case 4 strDrawSize = "D" Case 5 strDrawSize = "E" Case 6, 7 strDrawSize = "A4" Case 8 strDrawSize = "A3" Case 9 strDrawSize = "A2" Case 10 strDrawSize = "A1" Case 11 strDrawSize = "A0" Case 12 strDrawSize = "X" Case Else strDrawSize = "X" End Select
From there, you would have to select your template and apply it.
Note, this code is from a separate c# program but it should translate okay with a bit of syntax change
swSheet.SetTemplateName(newTemplateLocation); swSheet.ReloadTemplate(false); // false applies to the "keep note changes" flag
Then you will add your revision table based on the page size as well
Note, this is also code from a c# program. mCustomDrawingRevisionTable is my path to the table template file
swSheet.InsertRevisionTable2(true, 0, 0, (int)swBOMConfigurationAnchorType_e.swBOMConfigurationAnchor_TopRight, mCustomDrawingRevisionTable, (int)swRevisionTableSymbolShape_e.swRevisionTable_HexagonSymbol, true); // actually selects circle for bubble
Finally, you can add your first row with the following command
// Get reference to the revision table that just got added revTable = swSheet.RevisionTable; // Get table object from revision table object table = (TableAnnotation)revTable; // may not be needed for your application revTable.AddRevision("X");
The data can be added with
table.Text[row, col] = "whatever you want in the cell";
Hopefully this gets you on the right track with what you want to do.